2
0
forked from drew/smtprelay

Fix IniParser() to support various common formats

This commit is contained in:
Bernhard Froehlich
2022-05-23 14:51:54 +00:00
parent 7e3dbd515d
commit e9a2b9ad5a

View File

@@ -244,7 +244,7 @@ func IniParser(r io.Reader, set func(name, value string) error) error {
if index < 0 {
name, value = line, "true" // boolean option
} else {
name, value = line[:index], strings.TrimSpace(line[index:])
name, value = strings.TrimSpace(line[:index]), strings.Trim(strings.TrimSpace(line[index+1:]), "\"")
}
if i := strings.Index(value, " #"); i >= 0 {