mirror of
https://github.com/gilbertchen/duplicacy
synced 2025-12-12 22:33:28 +00:00
Remove a few util functions that aren't necessary
This commit is contained in:
@@ -460,31 +460,3 @@ func AtoSize(sizeString string) int {
|
||||
|
||||
return size
|
||||
}
|
||||
|
||||
func MinInt(x, y int) int {
|
||||
if x < y {
|
||||
return x
|
||||
}
|
||||
return y
|
||||
}
|
||||
|
||||
// Contains tells whether a contains x.
|
||||
func Contains(a []string, x string) bool {
|
||||
for _, n := range a {
|
||||
if x == n {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Find returns the smallest index i at which x == a[i],
|
||||
// or len(a) if there is no such index.
|
||||
func Find(a []string, x string) int {
|
||||
for i, n := range a {
|
||||
if x == n {
|
||||
return i
|
||||
}
|
||||
}
|
||||
return len(a)
|
||||
}
|
||||
Reference in New Issue
Block a user