golang/go
Voir sur GitHubcmd/go: reject unenforced 'go' versions (older than 1.6) in 'go.mod' files
Open
#36 319 ouverte le 30 déc. 2019
DocumentationGoCommandNeedsFixhelp wanted
Métriques du dépôt
- Stars
- (133 883 stars)
- Métriques de merge PR
- (Aucune PR mergée en 30 j)
Description
If I have a very simple Go package that doesn't depend on any language features added since the original Go 1 release, I naturally thought I could put in my go.mod file:
go 1
But that doesn't parse:
$ go install
go: errors parsing go.mod:
/home/me/proj/go.mod:3: usage: go 1.23
But go 1.0 is weird, because we never called it that. Is that correct? Docs don't say.
go 1.1 is also weird, because it implies that I'm depending on something that was added in Go 1.1, but I'm not.
So I guess go 1.11 for when modules were introduced?
/cc @ianlancetaylor @bcmills @jayconrod @dmitshur