mirror of
https://github.com/Quiq/docker-registry-ui.git
synced 2025-07-16 23:31:16 +00:00
chore: remove refs to deprecated io/ioutil
This commit is contained in:
parent
a41bc10f8a
commit
c7ab4438b1
@ -1,7 +1,6 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"net/url"
|
||||
"os"
|
||||
"strings"
|
||||
@ -43,7 +42,7 @@ func readConfig(configFile string) *configData {
|
||||
if _, err := os.Stat(configFile); os.IsNotExist(err) {
|
||||
panic(err)
|
||||
}
|
||||
data, err := ioutil.ReadFile(configFile)
|
||||
data, err := os.ReadFile(configFile)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
@ -67,7 +66,7 @@ func readConfig(configFile string) *configData {
|
||||
if _, err := os.Stat(config.PasswordFile); os.IsNotExist(err) {
|
||||
panic(err)
|
||||
}
|
||||
data, err := ioutil.ReadFile(config.PasswordFile)
|
||||
data, err := os.ReadFile(config.PasswordFile)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
@ -2,7 +2,6 @@ package registry
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"math"
|
||||
"os"
|
||||
"regexp"
|
||||
@ -59,7 +58,7 @@ func PurgeOldTags(client *Client, config *PurgeTagsConfig) {
|
||||
logger.Error("Not purging anything!")
|
||||
return
|
||||
}
|
||||
data, err := ioutil.ReadFile(config.KeepFromFile)
|
||||
data, err := os.ReadFile(config.KeepFromFile)
|
||||
if err != nil {
|
||||
logger.Warnf("Cannot read %s: %s", config.KeepFromFile, err)
|
||||
logger.Error("Not purging anything!")
|
||||
|
Loading…
Reference in New Issue
Block a user