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