Replace deprecated ioutil library, remove redundant statements + small optimizations

This commit is contained in:
ionutboangiu
2022-11-22 19:10:05 +02:00
committed by Dan Christian Bogos
parent 78b2f56c51
commit 82468c580d
57 changed files with 148 additions and 180 deletions

View File

@@ -23,7 +23,7 @@ import (
"database/sql"
"encoding/json"
"fmt"
"io/ioutil"
"os"
"path"
"strings"
"time"
@@ -80,7 +80,7 @@ func (self *SQLStorage) RebuildReverseForPrefix(prefix string) error {
}
func (self *SQLStorage) CreateTablesFromScript(scriptPath string) error {
fileContent, err := ioutil.ReadFile(scriptPath)
fileContent, err := os.ReadFile(scriptPath)
if err != nil {
return err
}