Removed firstIndex and replaced with strings.IndexAny

This commit is contained in:
stephen 2010-06-22 07:37:46 -04:00
parent 8f74ead862
commit bd314801c3
2 changed files with 2 additions and 13 deletions

View file

@ -84,10 +84,10 @@ func (c *ConfigFile) Read(reader io.Reader) (err os.Error) {
return ReadError{BlankSection, l}
default: // other alternatives
i := firstIndex(l, []byte{'=', ':'})
i := strings.IndexAny(l, "=:")
switch {
case i > 0: // option and value
i := firstIndex(l, []byte{'=', ':'})
i := strings.IndexAny(l, "=:")
option = strings.TrimSpace(l[0:i])
value := strings.TrimSpace(stripComments(l[i+1:]))
c.AddOption(section, option, value)