/
githubmirror
/
photoprism
Обзор
Документация
Войти
/
githubmirror
/
photoprism
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
pkg/list/remove.go
21 строка
372 B
Michael Mayer
API: Refactor JWT-based request authorization #98 #5230
26 сен 2025, 06:32
26 сен 2025, 06:32
48a965a
Код
Авторство
О чём код?
package list // Remove removes a string from a list and returns it. func Remove(list []string, s string) []string { if len(list) == 0 || s == "" { return list } else if s == Any { return []string{} } result := make([]string, 0, len(list)) // Find matches. for i := range list { if s != list[i] { result = append(result, list[i]) } } return result }