-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add v0 compatibility functions (#82)
* Add v0 compatibility functions bunch of dependants still use a version before generics this will help migration to be done progressively * lovely lint
- Loading branch information
Showing
10 changed files
with
483 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
package sliceutil | ||
|
||
// JoinInt see Join | ||
// Deprecated: use Join | ||
func JoinInt(ints []int64) string { | ||
return Join(ints) | ||
} | ||
|
||
// UniqInt64 see Unique | ||
// Deprecated: use Unique | ||
func UniqInt64(list []int64) []int64 { | ||
return Unique(list) | ||
} | ||
|
||
// UniqString see Unique | ||
// Deprecated: use Unique | ||
func UniqString(list []string) []string { | ||
return Unique(list) | ||
} | ||
|
||
// UniqueMergeSlices see MergeUnique | ||
// Deprecated: use MergeUnique | ||
func UniqueMergeSlices(s [][]int64) (result []int64) { | ||
return MergeUnique(s) | ||
} | ||
|
||
// InStringSlice see Contains | ||
// Deprecated: use Contains | ||
func InStringSlice(list []string, str string) bool { | ||
return Contains(list, str) | ||
} | ||
|
||
// InIntSlice see Contains | ||
// Deprecated: use Contains | ||
func InIntSlice(list []int, i int) bool { | ||
return Contains(list, i) | ||
} | ||
|
||
// InInt64Slice see Contains | ||
// Deprecated: use Contains | ||
func InInt64Slice(list []int64, i int64) bool { | ||
return Contains(list, i) | ||
} | ||
|
||
// RepeatString see Repeat | ||
// Deprecated: use Repeat | ||
func RepeatString(s string, n int) (r []string) { | ||
return Repeat(s, n) | ||
} | ||
|
||
// ChooseString see Choose | ||
// Deprecated: use Choose | ||
func ChooseString(l []string) string { | ||
return Choose(l) | ||
} | ||
|
||
// FilterString see Filter | ||
// Deprecated: use Filter | ||
func FilterString(list []string, fun func(string) bool) []string { | ||
return Filter(list, fun) | ||
} | ||
|
||
// RemoveString see Remove | ||
// Deprecated: use Remove | ||
func RemoveString(list []string, s string) (out []string) { | ||
return Remove(list, s) | ||
} | ||
|
||
// FilterStringEmpty see FilterEmpty | ||
// Deprecated: use FilterEmpty | ||
func FilterStringEmpty(e string) bool { | ||
return FilterEmpty(e) | ||
} | ||
|
||
// FilterInt see Filter | ||
// Deprecated: use Filter | ||
func FilterInt(list []int64, fun func(int64) bool) []int64 { | ||
return Filter(list, fun) | ||
} | ||
|
||
// StringMap see Map | ||
// Deprecated: use Map | ||
func StringMap(list []string, f func(string) string) []string { | ||
return Map(list, f) | ||
} |
Oops, something went wrong.