backend, options: Prefer strings.Cut to SplitN

Also realigned the various "split into host:bucket:prefix"
implementations.
This commit is contained in:
greatroar authored and Michael Eischer committed 2022-12-02 19:19:14 +01:00
1 parent 60aa87bbab
commit 65612d797c
9 files changed
+56 -66

No files matched your search

+2 -2
View File
@@ -127,6 +127,6 @@ func StripPassword(s string) string {
}
func extractScheme(s string) string {
data := strings.SplitN(s, ":", 2)
return data[0]
scheme, _, _ := strings.Cut(s, ":")
return scheme
}