You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Today, I read revel's src, and find a place in goconfig that I can't understand. Can you help me?
in goconfig/config/read.go Line93, why getting the index of "=:" twice, I think inner one is same as the outer one.
// Other alternatives
default:
i:=strings.IndexAny(l, "=:")
switch {
// Option and valuecasei>0:
i:=strings.IndexAny(l, "=:")
option=strings.TrimSpace(l[0:i])
value:=strings.TrimSpace(stripComments(l[i+1:]))
self.AddOption(section, option, value)
// Continuation of multi-line valuecasesection!=""&&option!="":
prev, _:=self.RawString(section, option)
value:=strings.TrimSpace(stripComments(l))
self.AddOption(section, option, prev+"\n"+value)
default:
returnerrors.New("could not parse line: "+l)
}
}
The text was updated successfully, but these errors were encountered:
Hi,
Today, I read revel's src, and find a place in goconfig that I can't understand. Can you help me?
in goconfig/config/read.go Line93, why getting the index of "=:" twice, I think inner one is same as the outer one.
The text was updated successfully, but these errors were encountered: