MCPcopy
hub / github.com/cli/cli / getColor

Function getColor

pkg/cmd/repo/credits/credits.go:280–293  ·  view source on GitHub ↗
(x int)

Source from the content-addressed store, hash-verified

278}
279
280func getColor(x int) string {
281 rainbow := []string{
282 "magenta",
283 "red",
284 "yellow",
285 "green",
286 "cyan",
287 "blue",
288 }
289
290 ix := x % len(rainbow)
291
292 return rainbow[ix]
293}
294
295func clear() {
296 // on windows we'd do cmd := exec.Command("cmd", "/c", "cls"); unfortunately the draw speed is so

Callers 1

creditsRunFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected