Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

replace errors.New(fmt.Sprintf(...)) with fmt.Errorf()

guosj354b7bdff04f
diff --git a/weed/filer/s3iam_conf.go b/weed/filer/s3iam_conf.go
index acff1e1bb8..d8f3c24459 100644
--- a/weed/filer/s3iam_conf.go
+++ b/weed/filer/s3iam_conf.go
@@ -2,7 +2,6 @@ package filer
import (
"bytes"
- "errors"
"fmt"
"io"
@@ -36,7 +35,7 @@ func CheckDuplicateAccessKey(s3cfg *iam_pb.S3ApiConfiguration) error {
if userName, found := accessKeySet[cred.AccessKey]; !found {
accessKeySet[cred.AccessKey] = ident.Name
} else {
- return errors.New(fmt.Sprintf("duplicate accessKey[%s], already configured in user[%s]", cred.AccessKey, userName))
+ return fmt.Errorf("duplicate accessKey[%s], already configured in user[%s]", cred.AccessKey, userName)
}
}
}