Torjus Håkestad
e0850233dc
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
34 lines
534 B
Go
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)
|
|
}
|