gpm/cmd/list.go

22 lines
383 B
Go

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