all: adopt strings, errors, and os helpers

This commit is contained in:
Kristoffer Dalby
2026-06-16 08:51:58 +00:00
parent 27468f944b
commit 4f4e95fc80
7 changed files with 19 additions and 44 deletions
+3 -3
View File
@@ -162,10 +162,10 @@ func credentialsFromConfig() (string, string, bool) {
return "", "", false
}
parts := strings.SplitN(string(decoded), ":", 2)
if len(parts) != 2 {
user, pass, ok := strings.Cut(string(decoded), ":")
if !ok {
return "", "", false
}
return parts[0], parts[1], true
return user, pass, true
}