On Mon, Jun 10, 2019 at 9:56 PM Dan Kortschak <d...@kortschak.io> wrote:
>
> The semantics of this line of go.mod is not described anywhere, but the
> tool chain blithely writes it to a go.mod file when there is no go
> directive present.
>
> Is there a way to mark the go.mod as go version-agnostic?

No.  But there is no particular reason to do so.

The semantics, such as they are, are documented at
https://golang.org/cmd/go/#hdr-The_go_mod_file: it's "the expected
language version."  It sets the -lang option passed to cmd/compile,
documented at https://golang.org/cmd/compile/.

You can write your own Go directive if you like, and it won't be
modified.  You can also set it programatically using `go mod edit
-go=version`.

Ian

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAOyqgcV2_t%3Dxd4fu-OYcXe8XxQ-YW5MuZd8cfJGpQPCPeJJWrA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to