Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deprecation comments #84

Merged
merged 1 commit into from
Dec 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions sliceutil/compatibility.go
Original file line number Diff line number Diff line change
@@ -1,84 +1,98 @@
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)
Expand Down
Loading