mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
more test refactoring
This commit is contained in:
@ -2,8 +2,12 @@ package utils
|
||||
|
||||
// IncludesString if the list contains the string
|
||||
func IncludesString(list []string, a string) bool {
|
||||
return IncludesStringFunc(list, func(b string) bool { return b == a })
|
||||
}
|
||||
|
||||
func IncludesStringFunc(list []string, fn func(string) bool) bool {
|
||||
for _, b := range list {
|
||||
if b == a {
|
||||
if fn(b) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user