Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/website: Mention specifically that minor version is not allowed in Go directives #43262

Closed
sagar-jadhav opened this issue Dec 18, 2020 · 3 comments
Labels
Documentation FrozenDueToAge NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone

Comments

@sagar-jadhav
Copy link

I was trying out Go modules and find out that If I specify 1.15.4 instead of 1.15 my build failed with the following error:

invalid go version '1.15.4': must match format 1.23

I referred to this documentation https://golang.org/ref/mod#go-mod-file-go. I think it will be better If we also recommend not to use the minor version or give examples of the wrong values for better understanding.

@gopherbot gopherbot added this to the Unreleased milestone Dec 18, 2020
@ALTree
Copy link
Member

ALTree commented Dec 18, 2020

It does say

a positive integer followed by a dot and a non-negative integer (for example, 1.9, 1.14)

which I think is pretty clear on the allowed format "an integer, a dot, another integer, that's it". The error you received on the bad version string is also very easy to understand:

1.15.4: must match format 1.23

I'm not sure we need to make the explanation longer, and in general "bad" examples (like "DO NOT DO THIS, IT'S INVALID: 1.14.7) are not great (you need to make it really clear that it's a bad example, which is often verbose, only presenting valid examples is generally clearer and preferable, IMO).

@ALTree ALTree added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Dec 18, 2020
@sagar-jadhav
Copy link
Author

sagar-jadhav commented Dec 18, 2020

@ALTree I got your point. Thanks.

@ALTree
Copy link
Member

ALTree commented Dec 18, 2020

Closing here then.

@ALTree ALTree closed this as completed Dec 18, 2020
@golang golang locked and limited conversation to collaborators Dec 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Documentation FrozenDueToAge NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Projects
None yet
Development

No branches or pull requests

3 participants