vanity/cmd/list.go

22 lines
407 B
Go
Raw Normal View History

package cmd
import (
"github.com/urfave/cli/v2"
"go.jolheiser.com/beaver"
"go.jolheiser.com/vanity/modules/config"
)
var List = cli.Command{
Name: "list",
Aliases: []string{"l"},
Usage: "List packages",
Action: doList,
}
func doList(ctx *cli.Context) error {
for _, pkg := range config.Packages {
beaver.Infof("%s (%s) -> %s | %s", pkg.Name, pkg.Path, pkg.Repo, pkg.SSH)
}
return nil
}