MCPcopy
hub / github.com/grafana/dskit / subexps

Function subexps

kv/memberlist/memberlist_logger.go:94–106  ·  view source on GitHub ↗
(line []byte)

Source from the content-addressed store, hash-verified

92)
93
94func 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}

Callers 1

WriteMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected