mirror of
https://github.com/genuinetools/reg.git
synced 2024-09-28 11:46:20 -04:00
a3b459b1a5
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
28 lines
435 B
Go
28 lines
435 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"strings"
|
|
|
|
"github.com/urfave/cli"
|
|
)
|
|
|
|
var tagsCommand = cli.Command{
|
|
Name: "tags",
|
|
Usage: "get the tags for a repository",
|
|
Action: func(c *cli.Context) error {
|
|
if len(c.Args()) < 1 {
|
|
return fmt.Errorf("pass the name of the repository")
|
|
}
|
|
|
|
tags, err := r.Tags(c.Args()[0])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
// Print the tags.
|
|
fmt.Println(strings.Join(tags, "\n"))
|
|
|
|
return nil
|
|
},
|
|
}
|