(format string, groups ...*gitlab.Group)
| 161 | } |
| 162 | |
| 163 | func printGroupsOut(format string, groups ...*gitlab.Group) { |
| 164 | switch format { |
| 165 | case JSON: |
| 166 | printJSON(groups) |
| 167 | case YAML: |
| 168 | printYAML(groups) |
| 169 | default: |
| 170 | if len(groups) == 0 { |
| 171 | fmt.Println(noResultMsg) |
| 172 | return |
| 173 | } |
| 174 | header := []string{"ID", "PATH", "URL", "PARENT ID"} |
| 175 | var rows [][]string |
| 176 | for _, v := range groups { |
| 177 | rows = append(rows, []string{ |
| 178 | iToS(v.ID), |
| 179 | v.FullPath, |
| 180 | v.WebURL, |
| 181 | iToS(v.ParentID), |
| 182 | }) |
| 183 | } |
| 184 | printTable(header, rows) |
| 185 | } |
| 186 | } |
| 187 | |
| 188 | func printProjectsOut(format string, projects ...*gitlab.Project) { |
| 189 | switch format { |
no test coverage detected