all: adopt strings, errors, and os helpers

This commit is contained in:
Kristoffer Dalby committed 2026-06-17 16:12:19 +02:00
1 parent 27468f944b
commit 4f4e95fc80
7 files changed
+19 -44

No files matched your search

+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
}