MCPcopy Create free account
hub / github.com/github/gh-aw / usageStringValue

Function usageStringValue

pkg/cli/token_usage.go:596–605  ·  view source on GitHub ↗
(parsed map[string]any, usage map[string]any, keys ...string)

Source from the content-addressed store, hash-verified

594}
595
596func usageStringValue(parsed map[string]any, usage map[string]any, keys ...string) string {
597 for _, key := range keys {
598 for _, candidate := range []any{usage[key], parsed[key]} {
599 if value, ok := candidate.(string); ok && strings.TrimSpace(value) != "" {
600 return value
601 }
602 }
603 }
604 return ""
605}
606
607func isFinite(value float64) bool {
608 return !math.IsNaN(value) && !math.IsInf(value, 0)

Callers 1

processOneUsageJSONLFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected