Add new test for multi-line YAML strings

This commit is contained in:
Ian Fijolek
2020-01-07 10:28:14 -08:00
parent f6ccd9a3bd
commit 0269ad3512
5 changed files with 91 additions and 12 deletions
+1 -4
View File
@@ -4,7 +4,6 @@ import (
"errors"
"io/ioutil"
"log"
"os"
"gopkg.in/yaml.v2"
)
@@ -78,9 +77,7 @@ func LoadConfig(filePath string) (config Config, err error) {
return
}
// TODO: Decide if this is better expanded here, or only when executing
envExpanded := os.ExpandEnv(string(data))
err = yaml.Unmarshal([]byte(envExpanded), &config)
err = yaml.Unmarshal(data, &config)
if err != nil {
return
}