Set Go toolchain to v1.26.1 and apply modernizations (#138)

This change makes sure that we use the latest Go version when building
and applies some modernization fixes.
This commit is contained in:
Philip Laine
2026-03-12 21:40:36 +01:00
committed by GitHub
parent 0fde3631b2
commit 47b1f55c45
8 changed files with 34 additions and 41 deletions
+1 -11
View File
@@ -2,16 +2,6 @@ package util
import "strings"
// Contains return if y is in slice x
func Contains[T comparable](x []T, y T) bool {
for _, v := range x {
if v == y {
return true
}
}
return false
}
// Without return all of x in same order without y
func Without[T comparable](x []T, y T) []T {
var ret []T
@@ -29,7 +19,7 @@ func Equivalent[T comparable](x, y []T) bool {
return false
}
mp := make(map[T]interface{})
mp := make(map[T]any)
for _, v := range x {
mp[v] = nil
}