Update the Go version in go.mod to 1.18 (#1132)

* Replace functions from `ioutil` with same functions from `io`

This is demanded by staticcheck if we upgrade the go version in go.mod.

* Replace ioutil.ReadDir with os.ReadDir

* Update Go version to 1.18 in go.mod

This requires abandoning use of the `ioutil` module (see parent commits)
to pass `staticcheck`.
This commit is contained in:
Ilya Grigoriev authored and GitHub committed 2023-02-26 01:01:04 +03:00
1 parent b02fd42df4
commit 7a7e81e88c
4 files changed
+18 -14

No files matched your search

+1 -2
View File
@@ -2,7 +2,6 @@ package main
import (
"io"
"io/ioutil"
"log"
"strconv"
)
@@ -38,7 +37,7 @@ type scanner struct {
}
func newScanner(r io.Reader) *scanner {
buf, err := ioutil.ReadAll(r)
buf, err := io.ReadAll(r)
if err != nil {
log.Printf("scanning: %s", err)
}