-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
bunch of dependants still use a version before generics this will help migration to be done progressively
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
package sliceutil | ||
|
||
// Deprecated: use Join | ||
Check warning on line 3 in sliceutil/compatibility.go GitHub Actions / lint
|
||
func JoinInt(ints []int64) string { | ||
return Join(ints) | ||
} | ||
|
||
// Deprecated: use Unique | ||
Check warning on line 8 in sliceutil/compatibility.go GitHub Actions / lint
|
||
func UniqInt64(list []int64) []int64 { | ||
return Unique(list) | ||
} | ||
|
||
// Deprecated: use Unique | ||
Check warning on line 13 in sliceutil/compatibility.go GitHub Actions / lint
|
||
func UniqString(list []string) []string { | ||
return Unique(list) | ||
} | ||
|
||
// Deprecated: use MergeUnique | ||
Check warning on line 18 in sliceutil/compatibility.go GitHub Actions / lint
|
||
func UniqueMergeSlices(s [][]int64) (result []int64) { | ||
return MergeUnique(s) | ||
} | ||
|
||
// Deprecated: use Contains | ||
Check warning on line 23 in sliceutil/compatibility.go GitHub Actions / lint
|
||
func InStringSlice(list []string, str string) bool { | ||
return Contains(list, str) | ||
} | ||
|
||
// Deprecated: use Contains | ||
Check warning on line 28 in sliceutil/compatibility.go GitHub Actions / lint
|
||
func InIntSlice(list []int, i int) bool { | ||
return Contains(list, i) | ||
} | ||
|
||
// Deprecated: use Contains | ||
Check warning on line 33 in sliceutil/compatibility.go GitHub Actions / lint
|
||
func InInt64Slice(list []int64, i int64) bool { | ||
return Contains(list, i) | ||
} | ||
|
||
// Deprecated: use Repeat | ||
func RepeatString(s string, n int) (r []string) { | ||
return Repeat(s, n) | ||
} | ||
|
||
// Deprecated: use Choose | ||
func ChooseString(l []string) string { | ||
return Choose(l) | ||
} | ||
|
||
// Deprecated: use Filter | ||
func FilterString(list []string, fun func(string) bool) []string { | ||
return Filter(list, fun) | ||
} | ||
|
||
// Deprecated: use Remove | ||
func RemoveString(list []string, s string) (out []string) { | ||
return Remove(list, s) | ||
} | ||
|
||
// Deprecated: use FilterEmpty | ||
func FilterStringEmpty(e string) bool { | ||
return FilterEmpty(e) | ||
} | ||
|
||
// Deprecated: use Filter | ||
func FilterInt(list []int64, fun func(int64) bool) []int64 { | ||
return Filter(list, fun) | ||
} | ||
|
||
// Deprecated: use Map | ||
func StringMap(list []string, f func(string) string) []string { | ||
return Map(list, f) | ||
} |