Added base
This commit is contained in:
parent
467eaea836
commit
dfeef01927
1 changed files with 51 additions and 0 deletions
51
lpm-cli.go
Normal file
51
lpm-cli.go
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/urfave/cli/v2"
|
||||
"log"
|
||||
"os"
|
||||
)
|
||||
|
||||
|
||||
func main(){
|
||||
app := &cli.App{
|
||||
Name: "lotus-pm",
|
||||
Usage: "Lotus Package Manager",
|
||||
Authors: []*cli.Author {
|
||||
{
|
||||
Name: "netbenix",
|
||||
Email: "netbenix@codenoodles.de",
|
||||
},
|
||||
{
|
||||
Name: "virusbear",
|
||||
},
|
||||
{
|
||||
Name: "maduut",
|
||||
},
|
||||
},
|
||||
Copyright: "(c) 2021 LPM-Group",
|
||||
Commands: []*cli.Command{
|
||||
{
|
||||
Name: "push",
|
||||
Usage: "push package",
|
||||
Description: "Pushes a package",
|
||||
HelpName: "push",
|
||||
Action: func(c *cli.Context) error {
|
||||
//Do Stuff
|
||||
return nil
|
||||
},
|
||||
OnUsageError: func(c *cli.Context, err error, isSubcommand bool) error {
|
||||
fmt.Printf("[ERROR] %s", err.Error())
|
||||
return err
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
err := app.Run(os.Args)
|
||||
if err != nil{
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
Reference in a new issue