mirror of
https://github.com/qdm12/gluetun.git
synced 2025-12-10 09:18:30 -06:00
- Faster start up - Clearer error messages - Allow for more Gluetun-specific customization - DNSSEC validation is dropped for now (it's sort of unneeded) - Fix #137
26 lines
747 B
Go
26 lines
747 B
Go
package settings
|
|
|
|
import (
|
|
"slices"
|
|
|
|
"github.com/qdm12/gosettings/reader"
|
|
"golang.org/x/exp/maps"
|
|
)
|
|
|
|
func readObsolete(r *reader.Reader) (warnings []string) {
|
|
keyToMessage := map[string]string{
|
|
"DOT_VERBOSITY": "DOT_VERBOSITY is obsolete, use LOG_LEVEL instead.",
|
|
"DOT_VERBOSITY_DETAILS": "DOT_VERBOSITY_DETAILS is obsolete because it was specific to Unbound.",
|
|
"DOT_VALIDATION_LOGLEVEL": "DOT_VALIDATION_LOGLEVEL is obsolete because DNSSEC validation is not implemented.",
|
|
}
|
|
sortedKeys := maps.Keys(keyToMessage)
|
|
slices.Sort(sortedKeys)
|
|
warnings = make([]string, 0, len(keyToMessage))
|
|
for _, key := range sortedKeys {
|
|
if r.Get(key) != nil {
|
|
warnings = append(warnings, keyToMessage[key])
|
|
}
|
|
}
|
|
return warnings
|
|
}
|