MCPcopy Create free account
hub / github.com/PasarGuard/node / parseStatName

Function parseStatName

backend/xray/api/stats.go:159–169  ·  view source on GitHub ↗
(raw string)

Source from the content-addressed store, hash-verified

157}
158
159func parseStatName(raw string) (name, link, statType string, ok bool) {
160 parts := strings.Split(raw, ">>>")
161 if len(parts) < 4 {
162 return "", "", "", false
163 }
164 if parts[1] == "" || parts[2] == "" || parts[3] == "" {
165 return "", "", "", false
166 }
167
168 return parts[1], parts[2], parts[3], true
169}

Callers 3

TestParseStatNameValidFunction · 0.85
buildStatResponseFunction · 0.85

Calls

no outgoing calls

Tested by 2

TestParseStatNameValidFunction · 0.68