Update supported go versions
Client: go
With the release of go 1.23, update supported go versions to 1.22+1.23
according to our go support policy.
Also update the code to use the new range loop feature introduced in go
1.22 when appropriate.
Also fix a bug in TSSLServerSocket.Addr that it does not return the
listener address.
diff --git a/lib/go/test/tests/equals_test.go b/lib/go/test/tests/equals_test.go
index b8adc77..f56d0cb 100644
--- a/lib/go/test/tests/equals_test.go
+++ b/lib/go/test/tests/equals_test.go
@@ -255,7 +255,7 @@
func genInt64Slice(length int) []int64 {
ret := make([]int64, length)
- for i := 0; i < length; i++ {
+ for i := range ret {
ret[i] = int64(length - i)
}
return ret
@@ -263,7 +263,7 @@
func genStringSlice(length int) []string {
ret := make([]string, length)
- for i := 0; i < length; i++ {
+ for i := range ret {
ret[i] = strconv.Itoa(length - i)
}
return ret
@@ -271,7 +271,7 @@
func genBytesSlice(length int) [][]byte {
ret := make([][]byte, length)
- for i := 0; i < length; i++ {
+ for i := range ret {
ret[i] = []byte(strconv.Itoa(length - i))
}
return ret
@@ -279,7 +279,7 @@
func genInt64StringMap(length int) map[int64]string {
ret := make(map[int64]string, length)
- for i := 0; i < length; i++ {
+ for i := range length {
ret[int64(i)] = strconv.Itoa(i)
}
return ret