style: golint (#988)

This commit is contained in:
Mikey
2022-08-09 16:50:49 +08:00
committed by GitHub
parent 4dd67a8dcb
commit 79119760f2
60 changed files with 237 additions and 164 deletions

View File

@ -20,7 +20,7 @@ import (
"encoding/hex"
"errors"
"fmt"
"io/ioutil"
"os"
"strconv"
"strings"
"time"
@ -168,7 +168,7 @@ func GetMinLenStr(strs ...string) string {
}
func ReadStringFromPath(path string) string {
data, err := ioutil.ReadFile(path)
data, err := os.ReadFile(path)
if err != nil {
panic(err)
}
@ -177,7 +177,7 @@ func ReadStringFromPath(path string) string {
}
func WriteStringToPath(s string, path string) {
err := ioutil.WriteFile(path, []byte(s), 0o644)
err := os.WriteFile(path, []byte(s), 0o644)
if err != nil {
panic(err)
}