You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when trying to create a newVersion for the amazon1/2 (and other distros) kernel version (output of uname -r) it reports a Malformed version.
for example: 4.14.77-70.59.amzn1.x86_64
A short investigation shows that the "_" in the x86_64 is the problem.
A short code to reproduce it:
package main
import (
"fmt"
version "github.com/hashicorp/go-version"
)
An underscore _, it seems, isn't supported in build numbers in semver but a fix for this issue, which I think is a legit issue btw, involves adding _ to the various match groups in the regex pattern but would cause this project to drift away from semver. Would love to hear from the members on this. cc/ @mitchellh
Yes i had already made a pr, but i also can imagine that they want to keep the underscore out as its not inline with semver,
oh this is open since 2020..
when trying to create a newVersion for the amazon1/2 (and other distros) kernel version (output of uname -r) it reports a Malformed version.
for example: 4.14.77-70.59.amzn1.x86_64
A short investigation shows that the "_" in the x86_64 is the problem.
A short code to reproduce it:
package main
import (
"fmt"
version "github.com/hashicorp/go-version"
)
func main() {
v1, err := version.NewVersion("4.4.23-31.54.amzn1.x86_64")
if err != nil {
fmt.Printf("Error %v\n", err)
return
} else {
fmt.Printf("Got version %v\n", v1)
}
}
The text was updated successfully, but these errors were encountered: