gpaste/cmd/server/server.go

34 lines
534 B
Go
Raw Normal View History

2022-01-15 18:07:33 +00:00
package main
2022-01-15 21:19:35 +00:00
import (
"fmt"
"os"
2022-01-20 02:47:58 +00:00
"git.t-juice.club/torjus/gpaste/cmd/server/actions"
2022-01-15 21:19:35 +00:00
"github.com/urfave/cli/v2"
)
var (
version = "dev"
commit = "none"
date = "unknown"
)
2022-01-15 18:07:33 +00:00
func main() {
2022-01-15 21:19:35 +00:00
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.",
},
},
2022-01-20 02:47:58 +00:00
Action: actions.ActionServe,
2022-01-15 21:19:35 +00:00
}
app.Run(os.Args)
}