From 429a9d9205bad2be34cdfe7fb5b1a9a6f127f541 Mon Sep 17 00:00:00 2001 From: Shulhan Date: Wed, 6 Apr 2022 01:40:07 +0700 Subject: 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. --- lib/sql/client.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/sql') 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) -- cgit v1.3-6-g1900