MCPcopy Create free account
hub / github.com/betta-tech/byo-coding-agent / formatThousands

Function formatThousands

internal/ui/program.go:1191–1199  ·  view source on GitHub ↗

formatThousands inserts thousands separators into a non-negative int. Mirrors the helper in commands.go; lives here too to avoid a UI → main dependency.

(n int)

Source from the content-addressed store, hash-verified

1189// Mirrors the helper in commands.go; lives here too to avoid a UI → main
1190// dependency.
1191func formatThousands(n int) string {
1192 if n < 0 {
1193 return "-" + formatThousands(-n)
1194 }
1195 if n < 1000 {
1196 return fmt.Sprintf("%d", n)
1197 }
1198 return formatThousands(n/1000) + "," + fmt.Sprintf("%03d", n%1000)
1199}

Callers 1

usageStatusMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected