mirror of
https://github.com/thegeeklab/git-sv.git
synced 2024-11-21 22:10:39 +00:00
refactor: change ioutil.ReadFile to os.ReadFile
This commit is contained in:
parent
5e2ea6bdeb
commit
eea20ebf6b
@ -2,8 +2,8 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
"os/exec"
|
||||
"reflect"
|
||||
"strings"
|
||||
@ -53,7 +53,7 @@ func combinedOutputErr(err error, out []byte) error {
|
||||
}
|
||||
|
||||
func readConfig(filepath string) (Config, error) {
|
||||
content, rerr := ioutil.ReadFile(filepath)
|
||||
content, rerr := os.ReadFile(filepath)
|
||||
if rerr != nil {
|
||||
return Config{}, rerr
|
||||
}
|
||||
|
@ -3,7 +3,6 @@ package main
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"sort"
|
||||
@ -500,7 +499,7 @@ func validateCommitMessageHandler(git sv.Git, messageProcessor sv.MessageProcess
|
||||
}
|
||||
|
||||
func readFile(filepath string) (string, error) {
|
||||
f, err := ioutil.ReadFile(filepath)
|
||||
f, err := os.ReadFile(filepath)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user