aboutsummaryrefslogtreecommitdiff
path: root/lib/sql
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2022-04-06 01:40:07 +0700
committerShulhan <ms@kilabit.info>2022-04-06 02:37:22 +0700
commit429a9d9205bad2be34cdfe7fb5b1a9a6f127f541 (patch)
tree1debf749d60e00a5ac03a3fecc6960aead0ad236 /lib/sql
parent7186de3415b130a6c67388d8f1bcf54404f6202b (diff)
downloadpakakeh.go-429a9d9205bad2be34cdfe7fb5b1a9a6f127f541.tar.xz
all: replace any usage of ioutil package with os or io
Since Go 1.16, the ioutil package has been deprecated. This changes replace any usage that use functions from ioutil package with their replacement from package os or package io.
Diffstat (limited to 'lib/sql')
-rw-r--r--lib/sql/client.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/sql/client.go b/lib/sql/client.go
index aa260307..bb2ad351 100644
--- a/lib/sql/client.go
+++ b/lib/sql/client.go
@@ -9,7 +9,6 @@ import (
"errors"
"fmt"
"io"
- "io/ioutil"
"log"
"net/http"
"os"
@@ -307,7 +306,7 @@ func loadSQL(fs http.FileSystem, fi os.FileInfo, filename string) (
return nil, fmt.Errorf("%s: %w", logp, err)
}
- sqlRaw, err = ioutil.ReadAll(file)
+ sqlRaw, err = io.ReadAll(file)
if err != nil {
if !errors.Is(err, io.EOF) {
return nil, fmt.Errorf("%s: %w", logp, err)