On Mon, Feb 26, 2024 at 8:26 PM leo zeng <leo.z...@adtiming.com> wrote:
>
> package main
>
> import "go/version"
>
> func main() {
>     var val int
>     val = version.Compare("go2.00.1", "go1.0.0")
>     print(val) // -1
> }

Please write plain text as plain text.  It's difficult to read against
a dark background.  Thanks.

The version code treats an unnecessary leading zero as an error.  You
can try calling version.Lang: it will return the empty string for an
erroneous 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/CAOyqgcXuYp6hLQNd7i-WUGsADhW64mxW_a408HhwmTmkD_SoHw%40mail.gmail.com.

Reply via email to