22 lines
389 B
Go
22 lines
389 B
Go
package cmd
|
|
|
|
import (
|
|
"gitea.com/jolheiser/beaver"
|
|
"gitea.com/jolheiser/gpm/modules/config"
|
|
"github.com/urfave/cli/v2"
|
|
)
|
|
|
|
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
|
|
}
|