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.

git.txt.go 720B

12345678910111213141516171819202122232425262728293031323334
  1. package main
  2. import (
  3. "dev.sigpipe.me/dashie/git.txt/cmd"
  4. "dev.sigpipe.me/dashie/git.txt/setting"
  5. "fmt"
  6. "github.com/getsentry/raven-go"
  7. "github.com/urfave/cli"
  8. "os"
  9. )
  10. const appVersion = "0.5.2"
  11. func init() {
  12. setting.AppVer = appVersion
  13. if os.Getenv("USE_RAVEN") == "true" {
  14. raven.SetDSN(os.Getenv("RAVEN_DSN"))
  15. fmt.Printf("Using Raven with DSN: %s\r\n", os.Getenv("RAVEN_DSN"))
  16. } else {
  17. fmt.Println("Running without Raven/Sentry support.")
  18. }
  19. }
  20. func main() {
  21. app := cli.NewApp()
  22. app.Name = "git.txt"
  23. app.Usage = "paste stuff to the interweb with git backend"
  24. app.Version = appVersion
  25. app.Commands = []cli.Command{
  26. cmd.Web,
  27. }
  28. app.Flags = append(app.Flags, []cli.Flag{}...)
  29. app.Run(os.Args)
  30. }