mirror of
https://github.com/qdm12/gluetun.git
synced 2026-05-09 20:29:23 +02:00
feat(env): clean env variable values
- Remove surrounding spaces - Remove suffix new line characters
This commit is contained in:
+1
-2
@@ -2,14 +2,13 @@ package env
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/qdm12/gluetun/internal/configuration/settings"
|
||||
)
|
||||
|
||||
func (r *Reader) readVPN() (vpn settings.VPN, err error) {
|
||||
vpn.Type = strings.ToLower(os.Getenv("VPN_TYPE"))
|
||||
vpn.Type = strings.ToLower(getCleanedEnv("VPN_TYPE"))
|
||||
|
||||
vpn.Provider, err = r.readProvider(vpn.Type)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user