release/release-0.3.0
parent a1c2f5f0c6
commit 6496cbe535
No known key found for this signature in database
GPG Key ID: 0B266738824CE0F0
  1. 8
      main.go

@ -25,7 +25,7 @@ var Checker CheckCommand
var Config CheckConfig
type CheckConfig struct {
Api string
Api string
UserId string
Token string
Client *gsclient.Client
@ -34,7 +34,7 @@ type CheckConfig struct {
func config(configFile string) {
if configFile == "" {
if !checkFileExistance( "config/check.toml") {
if !checkFileExistance("config/check.toml") {
Unknown(fmt.Sprintf("Configuration file is missing: %s", configFile))
}
@ -70,14 +70,14 @@ func config(configFile string) {
Config.Api,
Config.UserId,
Config.Token,
Checker.Debug, true, 120, 500,100)
Checker.Debug, true, 120, 500, 100)
Config.Client = gsclient.NewClient(config)
}
func main() {
var parser = flags.NewParser(&Checker, flags.Default)
_, err := parser.Parse();
_, err := parser.Parse()
if err != nil {
if flagsErr, ok := err.(*flags.Error); ok && flagsErr.Type == flags.ErrHelp {
os.Exit(0)

Loading…
Cancel
Save