-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
improved Go version check #445
improved Go version check #445
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: droot The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
80bf75f
to
37c064d
Compare
cmd/init_project.go
Outdated
return fmt.Errorf("invalid version string") | ||
} | ||
|
||
major, err := strconv.ParseInt(m[1], 10, 64) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I guess using strcov.Atoi
is OK and easier to understand.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
{"go1.10", false}, | ||
{"go1.10rc", false}, | ||
{"go1.10.1", false}, | ||
{"go1.11rc2", false}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be a valid RC version, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the flag is inverted :)
37c064d
to
b4bc772
Compare
Highlights: - Go version doesn't follow semver style from syntax perspective, so use semver pkg wasn't helpful - re-implemented go version check without using the semver pkg.
b4bc772
to
7b138f1
Compare
@mengqiy PTAL. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
Highlights:
use semver pkg wasn't helpful
fixes #412 #439