MCPcopy Create free account
hub / github.com/Chat2AnyLLM/code-agent-manager / formatStars

Function formatStars

internal/cli/management.go:302–314  ·  view source on GitHub ↗

formatStars formats a star count for display, like gh skill search: 0 → "" 65 → "★ 65" 1500 → "★ 1.5k" 40800 → "★ 40.8k"

(n int)

Source from the content-addressed store, hash-verified

300// 1500 → "★ 1.5k"
301// 40800 → "★ 40.8k"
302func formatStars(n int) string {
303 if n <= 0 {
304 return ""
305 }
306 if n < 1000 {
307 return fmt.Sprintf("★ %d", n)
308 }
309 k := float64(n) / 1000.0
310 if k >= 10 {
311 return fmt.Sprintf("★ %.1fk", k)
312 }
313 return fmt.Sprintf("★ %.1fk", k)
314}
315
316// searchGitHub queries the GitHub Code Search API for manifest files matching
317// the query, using parallel search strategies mirroring gh skill search:

Callers 3

entitySearchCommandFunction · 0.85
promptSearchInstallFunction · 0.85
mcpSearchCommandMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected