package main import ( "fmt" "github.com/urfave/cli/v2" "log" "os" "lpm-cli/informations" ) func main(){ app := &cli.App { Name: "lotus-pm", Usage: "Lotus Package Manager", Authors: informations.GetAuthors(), Copyright: "(c) 2021 LPM-Group", Commands: []*cli.Command { { Name: "push", Usage: "Push a package", Description: "Pushes a package to the default registry server, or to a user-defined registry server.", HelpName: "push", 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()) log.Fatal(err) } return err }, }, { Name: "pull", Usage: "Pull a package", Description: "Pulls a package from the default registry server, or to a user-defined registry server.", HelpName: "pull", 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()) log.Fatal(err) } return err }, }, }, } err := app.Run(os.Args) if err != nil { log.Fatal(err) } }