/
githubmirror
/
photoprism
Обзор
Документация
Войти
/
githubmirror
/
photoprism
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
pkg/enum/bool.go
53 строки
1 KB
Michael Mayer
Backend: Refactor new enum package and yes/no matching #5191
10 окт 2025, 14:40
10 окт 2025, 14:40
f26f6ec
Код
Авторство
О чём код?
package enum // True and False specify boolean string representations. const ( True = "true" False = "false" ) // YesMap enumerates lower-case tokens we accept as an affirmative answer across // supported languages (Czech, Danish, Dutch, English, French, German, // Indonesian, Italian, Polish, Portuguese, Russian, Ukrainian). Callers should // trim and lowercase input before performing lookups. var YesMap = map[string]struct{}{ "1": {}, "yes": {}, "include": {}, "true": {}, "positive": {}, "please": {}, "ano": {}, "ja": {}, "oui": {}, "si": {}, "sí": {}, "tak": {}, "sim": {}, "да": {}, "ya": {}, "так": {}, } // NoMap enumerates lower-case tokens we accept as a negative answer across the // same set of supported languages. Callers should trim and lowercase input // before performing lookups. var NoMap = map[string]struct{}{ "0": {}, "no": {}, "none": {}, "exclude": {}, "false": {}, "negative": {}, "unknown": {}, "žádný": {}, "ingen": {}, "nee": {}, "nein": {}, "non": {}, "nie": {}, "não": {}, "нет": {}, "tidak": {}, "ні": {}, }