Host snippets with a git backend. Like Gists but OpenSource.
https://gist.sigpipe.me/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
720 B
34 lines
720 B
package main
|
|
|
|
import (
|
|
"dev.sigpipe.me/dashie/git.txt/cmd"
|
|
"dev.sigpipe.me/dashie/git.txt/setting"
|
|
"fmt"
|
|
"github.com/getsentry/raven-go"
|
|
"github.com/urfave/cli"
|
|
"os"
|
|
)
|
|
|
|
const appVersion = "0.5.2"
|
|
|
|
func init() {
|
|
setting.AppVer = appVersion
|
|
if os.Getenv("USE_RAVEN") == "true" {
|
|
raven.SetDSN(os.Getenv("RAVEN_DSN"))
|
|
fmt.Printf("Using Raven with DSN: %s\r\n", os.Getenv("RAVEN_DSN"))
|
|
} else {
|
|
fmt.Println("Running without Raven/Sentry support.")
|
|
}
|
|
}
|
|
|
|
func main() {
|
|
app := cli.NewApp()
|
|
app.Name = "git.txt"
|
|
app.Usage = "paste stuff to the interweb with git backend"
|
|
app.Version = appVersion
|
|
app.Commands = []cli.Command{
|
|
cmd.Web,
|
|
}
|
|
app.Flags = append(app.Flags, []cli.Flag{}...)
|
|
app.Run(os.Args)
|
|
}
|
|
|