This repository has been archived on 2021-07-16. You can view files and clone it, but cannot push or open issues or pull requests.
go-abra/cli/cli.go

40 lines
563 B
Go

package cli
import (
"fmt"
"log"
"os"
"github.com/urfave/cli/v2"
)
func RunApp(version, commit string) {
app := &cli.App{
Name: "abra",
Usage: "The cooperative cloud utility belt 🎩🐇",
Version: fmt.Sprintf("%s-%s", version, commit[:7]),
Commands: []*cli.Command{
AppCommand,
ServerCommand,
{
Name: "recipe",
HideHelp: true,
Subcommands: []*cli.Command{
{
Name: "list",
},
{
Name: "create",
},
},
},
},
}
err := app.Run(os.Args)
if err != nil {
log.Fatal(err)
}
}