mirror of
https://github.com/minio/minio.git
synced 2026-11-17 14:56:19 +00:00
Move AppendUstr(), AppendUint() into helpers
This commit is contained in:
1 parent
9fb67c4195
commit
eb9a4a83ac
2 files changed
+21
-11
No files matched your search
@@ -52,3 +52,21 @@ func Assert(err error) {
|
||||
func FirstUpper(str string) string {
|
||||
return strings.ToUpper(str[0:1]) + str[1:]
|
||||
}
|
||||
|
||||
func AppendUint(slice []int, i int) []int {
|
||||
for _, ele := range slice {
|
||||
if ele == i {
|
||||
return slice
|
||||
}
|
||||
}
|
||||
return append(slice, i)
|
||||
}
|
||||
|
||||
func AppendUstr(slice []string, i string) []string {
|
||||
for _, ele := range slice {
|
||||
if ele == i {
|
||||
return slice
|
||||
}
|
||||
}
|
||||
return append(slice, i)
|
||||
}
|
||||
Reference in new issue
Block a user