(line []byte)
| 92 | ) |
| 93 | |
| 94 | func subexps(line []byte) map[string]string { |
| 95 | m := logRegexp.FindSubmatch(line) |
| 96 | if len(m) < len(logRegexp.SubexpNames()) { |
| 97 | return map[string]string{} |
| 98 | } |
| 99 | result := map[string]string{} |
| 100 | for i, name := range logRegexp.SubexpNames() { |
| 101 | if name != "" { |
| 102 | result[name] = string(m[i]) |
| 103 | } |
| 104 | } |
| 105 | return result |
| 106 | } |