Usinc the latest VSCode (1.40.1 at the time of the post) with the default Go extension (https://marketplace.visualstudio.com/items?itemName=ms-vscode.Go) with the default config.
Every time one would work with a Go project, some functionality (VSCode or the Go extension) updates some go.mod
or go.sum
files and sets file-ownership to root:root
. This happens on saving some of the Go source files (which triggers some auto module/sum check or something).
One has to explicitly chown
the file ownership to $USER:$USER
all the time.
Question
Any clues how to make sure the file ownership not getting changed?