This commit is contained in:
admju
2024-09-03 13:18:20 +00:00
parent 26404e5892
commit 11a4d5cc90
12 changed files with 121 additions and 96 deletions

View File

@@ -5,7 +5,7 @@ import (
"fmt"
"os"
"errors"
"io/ioutil"
"io"
"gopkg.in/yaml.v2"
log "oc-deploy/log_wrapper"
)
@@ -21,7 +21,7 @@ func GetFromFile(fileversion string) (string, error) {
}
defer fin.Close()
byteValue, err := ioutil.ReadAll(fin)
byteValue, err := io.ReadAll(fin)
if err != nil {
return "", err
}
@@ -64,7 +64,7 @@ func readLatestFile() (string, error) {
}
defer fin.Close()
byteValue, err := ioutil.ReadAll(fin)
byteValue, err := io.ReadAll(fin)
if err != nil {
return "", err
}
@@ -74,4 +74,4 @@ func readLatestFile() (string, error) {
yaml.Unmarshal(byteValue, &objmap)
return objmap.Version, nil
}
}