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

Function formatCountChange

pkg/cli/audit_math_helpers.go:44–50  ·  view source on GitHub ↗

formatCountChange formats the absolute change in a count value (e.g. "+3", "-1")

(count1, count2 int)

Source from the content-addressed store, hash-verified

42
43// formatCountChange formats the absolute change in a count value (e.g. "+3", "-1")
44func formatCountChange(count1, count2 int) string {
45 delta := count2 - count1
46 if delta >= 0 {
47 return fmt.Sprintf("+%d", delta)
48 }
49 return strconv.Itoa(delta)
50}
51
52// formatFloatDelta formats an absolute delta between two floating-point values.
53func formatFloatDelta(value1, value2 float64) string {

Callers 5

computeMCPToolsDiffFunction · 0.85
computeToolCallsDiffFunction · 0.85
computeBashCommandsDiffFunction · 0.85
computeTokenUsageDiffFunction · 0.85
TestFormatCountChangeFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestFormatCountChangeFunction · 0.68