From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- devdocs/go/go%2Fversion%2Findex.html | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 devdocs/go/go%2Fversion%2Findex.html (limited to 'devdocs/go/go%2Fversion%2Findex.html') diff --git a/devdocs/go/go%2Fversion%2Findex.html b/devdocs/go/go%2Fversion%2Findex.html new file mode 100644 index 00000000..88e5dc66 --- /dev/null +++ b/devdocs/go/go%2Fversion%2Findex.html @@ -0,0 +1,23 @@ +

Package version

Overview

Package version provides operations on Go versions in Go toolchain name syntax: strings like "go1.20", "go1.21.0", "go1.22rc2", and "go1.23.4-bigcorp".

Index

Package files

version.go

func Compare 1.22

func Compare(x, y string) int

Compare returns -1, 0, or +1 depending on whether x < y, x == y, or x > y, interpreted as Go versions. The versions x and y must begin with a "go" prefix: "go1.21" not "1.21". Invalid versions, including the empty string, compare less than valid versions and equal to each other. The language version "go1.21" compares less than the release candidate and eventual releases "go1.21rc1" and "go1.21.0".

+

func IsValid 1.22

func IsValid(x string) bool

IsValid reports whether the version x is valid.

+

func Lang 1.22

func Lang(x string) string

Lang returns the Go language version for version x. If x is not a valid version, Lang returns the empty string. For example:

+
Lang("go1.21rc2") = "go1.21"
+Lang("go1.21.2") = "go1.21"
+Lang("go1.21") = "go1.21"
+Lang("go1") = "go1"
+Lang("bad") = ""
+Lang("1.21") = ""
+
+

+ © Google, Inc.
Licensed under the Creative Commons Attribution License 3.0.
+ http://golang.org/pkg/go/version/ +

+
-- cgit v1.2.3