1
0
mirror of synced 2024-11-22 12:26:02 +03:00
mg-transport-telegram/main.go
Alex Lushpai acb2a62da5
Initial release (#1)
Routes
Migrations
Settings form
Activation/deactivation through retailCRM/MG Transport API
2018-05-17 18:35:53 +03:00

33 lines
586 B
Go

package main
import (
"os"
"github.com/getsentry/raven-go"
"github.com/jessevdk/go-flags"
)
// Options struct
type Options struct {
Config string `short:"c" long:"config" default:"config.yml" description:"Path to configuration file"`
}
const transport = "mg-telegram"
var options Options
var parser = flags.NewParser(&options, flags.Default)
func init() {
raven.SetDSN(config.SentryDSN)
}
func main() {
if _, err := parser.Parse(); err != nil {
if flagsErr, ok := err.(*flags.Error); ok && flagsErr.Type == flags.ErrHelp {
os.Exit(0)
} else {
os.Exit(1)
}
}
}