parseFile only return an error if also processing a Call. Uses reFile.
(c *Call, line []byte)
| 898 | // |
| 899 | // Uses reFile. |
| 900 | func parseFile(c *Call, line []byte) (bool, error) { |
| 901 | if match := reFile.FindSubmatch(line); match != nil { |
| 902 | num, ok := atou(match[2]) |
| 903 | if !ok { |
| 904 | return true, fmt.Errorf("failed to parse int on line: %q", bytes.TrimSpace(line)) |
| 905 | } |
| 906 | c.init(string(match[1]), num) |
| 907 | return true, nil |
| 908 | } |
| 909 | return false, nil |
| 910 | } |
| 911 | |
| 912 | // hasPrefix returns true if any of s is the prefix of p. |
| 913 | func hasPrefix(p string, s map[string]string) bool { |