build: modernize with "go fix -stringscut": use strings.Cut

This commit is contained in:
Nick Craig-Wood
2026-08-21 12:23:31 +01:00
parent 4e9577ed76
commit 7b002153bd
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -543,7 +543,7 @@ func (f *Fs) readDir(ctx context.Context, dir string) (names []string, err error
return nil, fmt.Errorf("failed to readDir: %w", err)
}
contentType := strings.SplitN(res.Header.Get("Content-Type"), ";", 2)[0]
contentType, _, _ := strings.Cut(res.Header.Get("Content-Type"), ";")
switch contentType {
case "text/html":
names, err = parse(u, res.Body)