Skip to content
Snippets Groups Projects
Verified Commit 3cdb9489 authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

fix: double and single quotes

parent 03258242
No related branches found
No related tags found
No related merge requests found
......@@ -43,6 +43,11 @@ func (s *Settings[C]) InitFromEnv(prefix string) *Settings[C] {
switch field.Kind() {
case reflect.String:
if (strings.HasPrefix(v, "\"") && strings.HasSuffix(v, "\"")) || (strings.HasPrefix(v, "'") && strings.HasSuffix(v, "'")) {
v = v[1 : len(v)-1]
}
field.SetString(v)
case reflect.Int:
intVar, err := strconv.Atoi(v)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment