Logo
Explore Help
Register Sign In
admin/gluetun
1
0
Fork 0
You've already forked gluetun
Code Issues Pull Requests Actions Packages Projects Releases Wiki Activity
Files
11149819146209303bb6fcff45b270cc6b1ed0c7
gluetun/internal/configuration/settings/helpers/belong.go

11 lines
174 B
Go
Raw Normal View History

chore(settings): refactor settings processing (#756) - Better settings tree structure logged using `qdm12/gotree` - Read settings from environment variables, then files, then secret files - Settings methods to default them, merge them and override them - `DNS_PLAINTEXT_ADDRESS` default changed to `127.0.0.1` to use DoT. Warning added if set to something else. - `HTTPPROXY_LISTENING_ADDRESS` instead of `HTTPPROXY_PORT` (with retro-compatibility)
2022-01-06 06:40:23 -05:00
package helpers
chore(settings): use github.com/qdm12/gosettings
2023-05-25 12:08:43 +00:00
func IsOneOf[T comparable](value T, choices ...T) (ok bool) {
chore(settings): refactor settings processing (#756) - Better settings tree structure logged using `qdm12/gotree` - Read settings from environment variables, then files, then secret files - Settings methods to default them, merge them and override them - `DNS_PLAINTEXT_ADDRESS` default changed to `127.0.0.1` to use DoT. Warning added if set to something else. - `HTTPPROXY_LISTENING_ADDRESS` instead of `HTTPPROXY_PORT` (with retro-compatibility)
2022-01-06 06:40:23 -05:00
for _, choice := range choices {
if value == choice {
return true
}
}
return false
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.2 Page: 187ms Template: 4ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API