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

Function printProjectsOut

cmd/helpers.go:188–212  ·  view source on GitHub ↗
(format string, projects ...*gitlab.Project)

Source from the content-addressed store, hash-verified

186}
187
188func printProjectsOut(format string, projects ...*gitlab.Project) {
189 switch format {
190 case JSON:
191 printJSON(projects)
192 case YAML:
193 printYAML(projects)
194 default:
195 if len(projects) == 0 {
196 fmt.Println(noResultMsg)
197 return
198 }
199 header := []string{"ID", "PATH", "URL", "ISSUES COUNT", "TAGS"}
200 var rows [][]string
201 for _, v := range projects {
202 rows = append(rows, []string{
203 iToS(v.ID),
204 v.PathWithNamespace,
205 v.HTTPURLToRepo,
206 iToS(v.OpenIssuesCount),
207 strings.Join(v.TagList, ","),
208 })
209 }
210 printTable(header, rows)
211 }
212}
213
214func printGroupMembersOut(format string, members ...*gitlab.GroupMember) {
215 switch format {

Callers 5

runGetProjectsFunction · 0.85
runGetProjectsFromGroupFunction · 0.85
runNewProjectFunction · 0.85
runEditProjectFunction · 0.85
runDescProjectFunction · 0.85

Calls 4

printJSONFunction · 0.85
printYAMLFunction · 0.85
iToSFunction · 0.85
printTableFunction · 0.85

Tested by

no test coverage detected