MCPcopy Index your code
hub / github.com/devopsctl/gitlabctl / printReleasesOut

Function printReleasesOut

cmd/helpers.go:374–395  ·  view source on GitHub ↗
(format string, releases ...*gitlab.Release)

Source from the content-addressed store, hash-verified

372}
373
374func printReleasesOut(format string, releases ...*gitlab.Release) {
375 switch format {
376 case YAML:
377 printYAML(releases)
378 case JSON:
379 printJSON(releases)
380 default:
381 if len(releases) == 0 {
382 fmt.Println(noResultMsg)
383 return
384 }
385 header := []string{"TAG NAME","DESCRIPTION"}
386 var rows [][]string
387 for _, v := range releases {
388 rows = append(rows, []string{
389 v.TagName,
390 v.Description,
391 })
392 }
393 printTable(header, rows)
394 }
395}

Callers 2

runNewReleaseFunction · 0.85
runEditReleaseFunction · 0.85

Calls 3

printYAMLFunction · 0.85
printJSONFunction · 0.85
printTableFunction · 0.85

Tested by

no test coverage detected