22 lines
383 B
Go
22 lines
383 B
Go
|
package cmd
|
||
|
|
||
|
import (
|
||
|
"gitea.com/gpm/gpm/modules/config"
|
||
|
"gitea.com/jolheiser/beaver"
|
||
|
"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
|
||
|
}
|