mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-05-07 15:10:01 +08:00
chore: for backward compatibility (#4852)
Signed-off-by: kevin <wanjunfeng@gmail.com>
This commit is contained in:
@@ -15,6 +15,12 @@ var (
|
||||
ErrInvalidStopPosition = errors.New("stop position is invalid")
|
||||
)
|
||||
|
||||
// Contains checks if str is in list.
|
||||
// Deprecated: use slices.Contains instead.
|
||||
func Contains(list []string, str string) bool {
|
||||
return slices.Contains(list, str)
|
||||
}
|
||||
|
||||
// Filter filters chars from s with given filter function.
|
||||
func Filter(s string, filter func(r rune) bool) string {
|
||||
var n int
|
||||
|
||||
Reference in New Issue
Block a user