1
0
mirror of https://github.com/amir20/dozzle.git synced 2026-01-04 12:05:07 +01:00

fix: removes deprecated code (#2730)

This commit is contained in:
Amir Raminfar
2024-01-24 09:48:29 -08:00
committed by GitHub
parent 808abd57bb
commit ef636c86fc
9 changed files with 26 additions and 29 deletions

View File

@@ -17,7 +17,7 @@ const (
profileFilename = "profile.json"
)
var missingProfileErr = errors.New("Profile file does not exist")
var errMissingProfileErr = errors.New("Profile file does not exist")
type Settings struct {
Search bool `json:"search"`
@@ -66,7 +66,7 @@ func UpdateFromReader(user auth.User, reader io.Reader) error {
mux.Lock()
defer mux.Unlock()
existingProfile, err := Load(user)
if err != nil && err != missingProfileErr {
if err != nil && err != errMissingProfileErr {
return err
}
@@ -112,7 +112,7 @@ func Load(user auth.User) (Profile, error) {
profilePath := filepath.Join(path, profileFilename)
if _, err := os.Stat(profilePath); os.IsNotExist(err) {
return Profile{}, missingProfileErr
return Profile{}, errMissingProfileErr
}
f, err := os.Open(profilePath)