Skip to content

Commit 0cf19b6

Browse files
loresusopoiana
authored andcommitted
update(pkg): add way to print output of artifact info as a table
Signed-off-by: Lorenzo Susini <[email protected]>
1 parent 0643f2f commit 0cf19b6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/output/output.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ const (
3333
ArtifactSearch TableHeader = iota
3434
// IndexList identifies the header for index list.
3535
IndexList
36+
// ArtifactInfo identifies the header for artifact info
37+
ArtifactInfo
3638
)
3739

3840
var spinnerCharset = []string{"⠈⠁", "⠈⠑", "⠈⠱", "⠈⡱", "⢀⡱", "⢄⡱", "⢄⡱", "⢆⡱", "⢎⡱", "⢎⡰", "⢎⡠", "⢎⡀", "⢎⠁", "⠎⠁", "⠊⠁"}
@@ -176,6 +178,8 @@ func (p *Printer) PrintTable(header TableHeader, data [][]string) error {
176178
table = [][]string{{"INDEX", "ARTIFACT", "TYPE", "REGISTRY", "REPOSITORY"}}
177179
case IndexList:
178180
table = [][]string{{"NAME", "URL", "ADDED", "UPDATED"}}
181+
case ArtifactInfo:
182+
table = [][]string{{"REF", "TAGS"}}
179183
default:
180184
return fmt.Errorf("unsupported output table")
181185
}

0 commit comments

Comments
 (0)