- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for foreachField (0.13 sec)
-
src/net/parse.go
func removeComment(line string) string { if i := bytealg.IndexByteString(line, '#'); i != -1 { return line[:i] } return line } // foreachField runs fn on each non-empty run of non-space bytes in x. // It returns the first non-nil error returned by fn. func foreachField(x string, fn func(field string) error) error { x = trimSpace(x) for len(x) > 0 { sp := bytealg.IndexByteString(x, ' ') if sp == -1 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 06 14:00:54 UTC 2024 - 5.7K bytes - Viewed (0) -
src/net/nss.go
source: src, criteria: criteria, }) } } return conf } // parses "foo=bar !foo=bar" func parseCriteria(x string) (c []nssCriterion, err error) { err = foreachField(x, func(f string) error { not := false if len(f) > 0 && f[0] == '!' { not = true f = f[1:] } if len(f) < 3 { return errors.New("criterion too short") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Nov 15 20:15:51 UTC 2022 - 5.5K bytes - Viewed (0)