Added ListCommand base
This commit is contained in:
parent
1bd48b980f
commit
c653e17033
1 changed files with 27 additions and 0 deletions
27
Commands/ListCommand.go
Normal file
27
Commands/ListCommand.go
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
package Commands
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"github.com/urfave/cli/v2"
|
||||||
|
"lpm-cli/Tools"
|
||||||
|
)
|
||||||
|
|
||||||
|
func ListCommand() *cli.Command{
|
||||||
|
return &cli.Command{
|
||||||
|
Name: "list",
|
||||||
|
Usage: "Lists all packages",
|
||||||
|
Description: "Lists all packages from all registry servers.",
|
||||||
|
HelpName: "list",
|
||||||
|
Action: func(c *cli.Context) error {
|
||||||
|
//Do Stuff
|
||||||
|
return nil
|
||||||
|
},
|
||||||
|
OnUsageError: func(c *cli.Context, err error, isSubcommand bool) error {
|
||||||
|
if err != nil {
|
||||||
|
fmt.Printf("[ERROR] %s", err.Error())
|
||||||
|
Tools.ErrorLogger.Fatal(err)
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in a new issue