fix(settings): use qdm12/gosettings env.Get

This commit is contained in:
Quentin McGaw
2023-05-29 20:43:06 +00:00
parent b961284845
commit 47593928f9
20 changed files with 51 additions and 58 deletions

View File

@@ -4,6 +4,7 @@ import (
"fmt"
"github.com/qdm12/gluetun/internal/configuration/settings"
"github.com/qdm12/gosettings/sources/env"
"github.com/qdm12/govalid/binary"
)
@@ -19,7 +20,7 @@ func (s *Source) readControlServer() (controlServer settings.ControlServer, err
}
func readControlServerLog() (enabled *bool, err error) {
s := getCleanedEnv("HTTP_CONTROL_SERVER_LOG")
s := env.Get("HTTP_CONTROL_SERVER_LOG")
log, err := binary.Validate(s)
if err != nil {
return nil, fmt.Errorf("environment variable HTTP_CONTROL_SERVER_LOG: %w", err)