mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
upgrade golang-lint to the latest (#15600)
This commit is contained in:
@@ -48,10 +48,11 @@ func etcdKvsToSet(prefix string, kvs []*mvccpb.KeyValue) set.StringSet {
|
||||
|
||||
// Extract path string by stripping off the `prefix` value and the suffix,
|
||||
// value, usually in the following form.
|
||||
// s := "config/iam/users/foo/config.json"
|
||||
// prefix := "config/iam/users/"
|
||||
// suffix := "config.json"
|
||||
// result is foo
|
||||
//
|
||||
// s := "config/iam/users/foo/config.json"
|
||||
// prefix := "config/iam/users/"
|
||||
// suffix := "config.json"
|
||||
// result is foo
|
||||
func extractPathPrefixAndSuffix(s string, prefix string, suffix string) string {
|
||||
return pathClean(strings.TrimSuffix(strings.TrimPrefix(s, prefix), suffix))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user