gpaste/cmd/server/server.go
Torjus Håkestad e0850233dc
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Add actions packages for cli stuff
2022-01-20 03:47:58 +01:00

34 lines
534 B
Go

package main
import (
"fmt"
"os"
"git.t-juice.club/torjus/gpaste/cmd/server/actions"
"github.com/urfave/cli/v2"
)
var (
version = "dev"
commit = "none"
date = "unknown"
)
func main() {
cli.VersionFlag = &cli.BoolFlag{Name: "version"}
app := cli.App{
Name: "gpaste-server",
Version: fmt.Sprintf("gpaste-server %s-%s (%s)", version, commit, date),
Flags: []cli.Flag{
&cli.StringFlag{
Name: "config",
Usage: "Path to config-file.",
},
},
Action: actions.ActionServe,
}
app.Run(os.Args)
}