main.go 410 B

12345678910111213141516171819202122232425262728
  1. package main
  2. import (
  3. "github.com/gshopify/service-wrapper/config"
  4. "github.com/spf13/pflag"
  5. "os"
  6. "time"
  7. )
  8. var (
  9. fPort = pflag.IntP("port", "p", 80, "exposing port")
  10. fTimeout = pflag.DurationP("timeout", "t", 15*time.Second, "timeout duration")
  11. )
  12. func init() {
  13. pflag.Parse()
  14. config.Instance()
  15. config.PrintBanner()
  16. }
  17. func main() {
  18. if err := serve(); err != nil {
  19. panic(err)
  20. }
  21. os.Exit(0)
  22. }