MCPcopy Create free account
hub / github.com/cli/cli / joinLimited

Function joinLimited

script/ghmock/report.go:399–404  ·  view source on GitHub ↗

joinLimited joins items, showing at most limit of them.

(items []string, limit int)

Source from the content-addressed store, hash-verified

397
398// joinLimited joins items, showing at most limit of them.
399func joinLimited(items []string, limit int) string {
400 if len(items) > limit {
401 return strings.Join(items[:limit], ", ") + fmt.Sprintf(" and %d more", len(items)-limit)
402 }
403 return strings.Join(items, ", ")
404}
405
406func exitLabel(res runResult) string {
407 if res.timedOut {

Callers 2

addedPathsFunction · 0.85
printDifferencesFunction · 0.85

Calls 1

JoinMethod · 0.80

Tested by

no test coverage detected