1
0
Fork 0
forked from mirrors/ntfy
ntfy/main.go
2021-12-19 18:32:16 -05:00

35 lines
776 B
Go

package main
import (
"fmt"
"github.com/urfave/cli/v2"
"heckel.io/ntfy/cmd"
"os"
"runtime"
)
var (
version = "dev"
commit = "unknown"
date = "unknown"
)
func main() {
cli.AppHelpTemplate += fmt.Sprintf(`
Try 'ntfy COMMAND --help' or https://ntfy.sh/docs/ for more information.
To report a bug, open an issue on GitHub: https://github.com/binwiederhier/ntfy/issues.
If you want to chat, simply join the Discord server: https://discord.gg/cT7ECsZj9w.
ntfy %s (%s), runtime %s, built at %s
Copyright (C) 2021 Philipp C. Heckel, licensed under Apache License 2.0 & GPLv2
`, version, commit[:7], runtime.Version(), date)
app := cmd.New()
app.Version = version
if err := app.Run(os.Args); err != nil {
fmt.Fprintln(os.Stderr, err.Error())
os.Exit(1)
}
}