3 ms·
"The go get -insecure flag is deprecated and will be removed in a future version. [...] To permit the use of insecure schemes, use the GOINSECURE environment va
by xpressvideoz 6y ago
"The go get -insecure flag is deprecated and will be removed in a future version. [...] To permit the use of insecure schemes, use the GOINSECURE environment variable instead."
I'm not a fan of using pervasive environment variables. It feels like cluttering my own, well, environment. I very much prefer using explicit command-line options, or even configuration files. Does anybody share the same opinion?
- xyzzy_plugh 6y agoHuh? They're removing a flag, and recommending use of a environment variable. The environment variable can easily cover all cases in which fetching dependencies can occur, whereas the flag would have to be glued on to a bunch of `go mod` subcommands. There's no need to export this to your environment, you can just use it as a one-shot, similar to the flag: GOINSECURE=foo.com,*.bar.com go get ./...
- xpressvideoz 6y agoYeah, that's exactly what I'm opposed to. I know the in-line environment variable syntax, and I actually use it, but somehow I feel uneasy whenever I need to do that. Possibly related to my own aesthetic preference, I don't know. I just like "bolted-on" flags more.
- yobert 6y agoSince GOOS and GOARCH are not going anywhere, I'm guessing they're just trying to unify a little more to one scheme.