mirror of
https://github.com/restic/restic.git
synced 2025-10-09 19:10:25 +00:00
backend, options: Prefer strings.Cut to SplitN
Also realigned the various "split into host🪣prefix"
implementations.
This commit is contained in:

committed by
Michael Eischer

parent
60aa87bbab
commit
65612d797c
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user