mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
replace errors.New(fmt.Sprintf(...)) with fmt.Errorf()
This commit is contained in:
parent
ab1b9697e6
commit
354b7bdff0
|
@ -2,7 +2,6 @@ package filer
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"errors"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
|
@ -36,7 +35,7 @@ func CheckDuplicateAccessKey(s3cfg *iam_pb.S3ApiConfiguration) error {
|
||||||
if userName, found := accessKeySet[cred.AccessKey]; !found {
|
if userName, found := accessKeySet[cred.AccessKey]; !found {
|
||||||
accessKeySet[cred.AccessKey] = ident.Name
|
accessKeySet[cred.AccessKey] = ident.Name
|
||||||
} else {
|
} 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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue