misc: Upgrade Go to v1.21
Upgrade to 1.21 as 1.20 is now unmaintained. Most changes are related to the new `slices` package from standard library, which can replace some existing custom functions.
This commit is contained in:
@@ -5,15 +5,6 @@ import (
|
||||
"os"
|
||||
)
|
||||
|
||||
// Return a slice of range [0, n)
|
||||
func Range(n int) []int {
|
||||
s := make([]int, n)
|
||||
for i := 0; i < n; i++ {
|
||||
s[i] = i
|
||||
}
|
||||
return s
|
||||
}
|
||||
|
||||
func CopyFile(srcPath, dstPath string) error {
|
||||
fin, err := os.Open(srcPath)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user