/
githubmirror
/
photoprism
Обзор
Документация
Войти
/
githubmirror
/
photoprism
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
pkg/list/excludes.go
19 строк
375 B
Michael Mayer
Performance: Refactor database schema and UI components #995 #1438 #1811
30 мар 2022, 21:36
30 мар 2022, 21:36
9eda12a
Код
Авторство
О чём код?
package list // Excludes tests if a string is not contained in the list. func Excludes(list []string, s string) bool { if len(list) == 0 || s == "" { return false } return !Contains(list, s) } // ExcludesAny tests if two lists exclude each other. func ExcludesAny(l, s []string) bool { if len(l) == 0 || len(s) == 0 { return false } return !ContainsAny(l, s) }