Thanks Sean.
On Fri, Jan 20, 2023 at 10:39 AM 'Sean Liao' via golang-nuts
<
golan...@googlegroups.com> wrote:
>
> in module mode,
> GOPATH is really only used for deriving default locations for GOBIN and GOMODCACHE
> setting it to /dev/null might not be great for caching dependencies if GOMODCACHE isn't set
I think it would bring some closure if we could definitively say
"GOPATH isn't needed".
GOCACHE seems to default to ~/.cache/go-build on my machine.
Shouldn't GOMODCACHE do the same?
Great - I voted it up, but I don't know if that helps at all. Setting
GOBIN would be a better solution for k8s, if it only worked.
Another thing that we end up writing scripts for is the various sets
of build flags. Like, if you want to build debug binaries there are
something like 4 flags to change. It would be super interesting to
have in-repo or in-module metadata that could be used for these flags.
For example, what if I could add something that said "GOBIN=./bin" or
even more flexible.
> There are open requests to print out the directory where it would be installed,
> (presumably to update PATH) but not for the actual binaries built.
>
https://go.dev/issue/45546
Also voted up, but it seems stalled.
> -o dir/ ending in a slash is documented as:
> > If the named output is an existing directory or
> > ends with a slash or backslash, then any resulting executables
> > will be written to that directory.
Sure, it's documented, but one mistake and all subsequent invocations
fail. It works, but it's just fragile.
Tim
> You received this message because you are subscribed to a topic in the Google Groups "golang-nuts" group.
> To unsubscribe from this topic, visit
https://groups.google.com/d/topic/golang-nuts/Vhd4OZ6vfHc/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
golang-nuts...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/CAGabyPocd8cx%3Dyg1arT74ULHoLjB4eNrUm17dqAw6KG8SazmPA%40mail.gmail.com.