mirror of
https://github.com/versity/versitygw.git
synced 2026-09-19 14:34:19 +00:00
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:
@@ -56,8 +56,8 @@ func NewPutBucketCORSCommand(command *S3Command, ruleStrings []string) (*S3Comma
|
||||
|
||||
func assembleCORSRule(ruleString string) (*CORSRule, error) {
|
||||
corsRule := &CORSRule{}
|
||||
ruleComponents := strings.Split(ruleString, ";")
|
||||
for _, component := range ruleComponents {
|
||||
ruleComponents := strings.SplitSeq(ruleString, ";")
|
||||
for component := range ruleComponents {
|
||||
componentSegments := strings.Split(component, "=")
|
||||
switch componentSegments[0] {
|
||||
case AllowedMethods:
|
||||
|
||||
Reference in New Issue
Block a user