(format string, projects ...*gitlab.Project)
| 186 | } |
| 187 | |
| 188 | func 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 | |
| 214 | func printGroupMembersOut(format string, members ...*gitlab.GroupMember) { |
| 215 | switch format { |
no test coverage detected