Go
Overriding Repos in Go.mod [^1]
Go defaults to using the public Go module mirror goproxy.io
and validating modules against the public Go checksum database at sum.golang.org
. However, when Go source code is not available publicly, this needs to be overridden using environment variables.
- Skip the Go proxy using
direct
. Proxy can also be overridden with a URL. This is a comma separated list.
export GOPROXY=https://goproxy.io,direct
- You can mark packages private using
GOPRIVATE
which will set bothGONOPROXY
andGONOSUMDB
.export GOPRIVATE=git.mycompany.com,github.com/my/private
- Finally, if you normally have source code public and need to override, you can do so by comining with
insteadof
in gitconfig
[url "git@github.com:"\]
insteadOf = https://github.com/
References
Notes mentioning this note
Programming
[[code Reviews]]
[[rust]]
[[go]]
[[debugging_stripped_binaries_in_go]]
[[debugging_stripped_binaries_in_cpp]]
Code Reviews
Code reviews are a process in which other members of a team review code changes before they get committed to...
Supply Chain
Part of the mindset of bringing in thirdparty code is the idea that it has already been tested for quality...