Replace deprecated ioutil pkg with os & io

As of Go 1.16, the same functionality is now provided by package io or
package os, and those implementations should be preferred in new code.

So replacing all usage of ioutil pkg with io & os.
This commit is contained in:
Abhinav Nair
2022-06-26 16:57:29 +08:00
parent 7b4a8df991
commit baec8ed6b6
35 changed files with 109 additions and 139 deletions
+3 -3
View File
@@ -3,13 +3,13 @@ package sqlcipher
import (
"database/sql"
"fmt"
"go.uber.org/atomic"
"io"
"io/ioutil"
nurl "net/url"
"strconv"
"strings"
"go.uber.org/atomic"
"github.com/golang-migrate/migrate/v4"
"github.com/golang-migrate/migrate/v4/database"
"github.com/hashicorp/go-multierror"
@@ -192,7 +192,7 @@ func (m *Sqlite) Unlock() error {
}
func (m *Sqlite) Run(migration io.Reader) error {
migr, err := ioutil.ReadAll(migration)
migr, err := io.ReadAll(migration)
if err != nil {
return err
}