chore: run go modernize tool

This is a fixup of the codebase using:
go run golang.org/x/tools/go/analysis/passes/modernize/cmd/modernize@latest -fix ./...

This has no bahvior changes, and only updates safe changes for
modern go features.
This commit is contained in:
Ben McClelland
2026-03-10 09:47:37 -07:00
parent 6e13be6984
commit 97cc6bf23b
29 changed files with 67 additions and 88 deletions
+4 -4
View File
@@ -583,11 +583,11 @@ func parseCreateBucketPayload(input string) ([]byte, error) {
}
for _, part := range inputParts {
part = strings.TrimSpace(part)
if strings.HasPrefix(part, "LocationConstraint=") {
locConstraint := strings.TrimPrefix(part, "LocationConstraint=")
if after, ok := strings.CutPrefix(part, "LocationConstraint="); ok {
locConstraint := after
config.LocationConstraint = &locConstraint
} else if strings.HasPrefix(part, "Tags=") {
tags, err := parseTagging(strings.TrimPrefix(part, "Tags="))
} else if after, ok := strings.CutPrefix(part, "Tags="); ok {
tags, err := parseTagging(after)
if err != nil {
return nil, err
}
+2 -4
View File
@@ -68,8 +68,7 @@ func initPosix(ctx context.Context) {
log.Fatalf("init posix: %v", err)
}
wg.Add(1)
go func() {
wg.Go(func() {
err = runGateway(ctx, be)
if err != nil && err != context.Canceled {
log.Fatalf("run gateway: %v", err)
@@ -79,8 +78,7 @@ func initPosix(ctx context.Context) {
if err != nil {
log.Fatalf("remove temp directory: %v", err)
}
wg.Done()
}()
})
// wait for server to start
time.Sleep(1 * time.Second)