diff options
author | Bjørn Erik Pedersen <[email protected]> | 2022-03-17 21:58:54 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2022-03-21 09:32:35 +0100 |
commit | 0e305d695820779a5c66fbe3434e3293911d7f98 (patch) | |
tree | af07f4be9ef8682cff914cbcf9d6e42e05c81434 /config/env.go | |
parent | 5adb81ce39a36214712762288c6aab9ebcff5e24 (diff) | |
download | hugo-0e305d695820779a5c66fbe3434e3293911d7f98.tar.gz hugo-0e305d695820779a5c66fbe3434e3293911d7f98.zip |
all: Use strings.Cut
Updates #9687
Diffstat (limited to 'config/env.go')
-rw-r--r-- | config/env.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/config/env.go b/config/env.go index 1e7d47216..1e9266b17 100644 --- a/config/env.go +++ b/config/env.go @@ -41,8 +41,8 @@ func SetEnvVars(oldVars *[]string, keyValues ...string) { } func SplitEnvVar(v string) (string, string) { - parts := strings.SplitN(v, "=", 2) - return parts[0], parts[1] + name, value, _ := strings.Cut(v, "=") + return name, value } func setEnvVar(vars *[]string, key, value string) { |