--- a/cmd/madon.go Mon May 01 14:37:42 2017 +0200
+++ b/cmd/madon.go Mon May 01 15:04:08 2017 +0200
@@ -67,7 +67,7 @@
errPrint("Warning: provided app id/secrets incomplete -- registering again")
}
- gClient, err = madon.NewApp(AppName, scopes, madon.NoRedirect, instanceURL)
+ gClient, err = madon.NewApp(AppName, AppWebsite, scopes, madon.NoRedirect, instanceURL)
if err != nil {
return errors.Wrap(err, "app registration failed")
}
--- a/cmd/root.go Mon May 01 14:37:42 2017 +0200
+++ b/cmd/root.go Mon May 01 15:04:08 2017 +0200
@@ -20,13 +20,21 @@
// AppName is the CLI application name
const AppName = "madonctl"
+
+// AppWebsite is the application website URL
+const AppWebsite = "https://github.com/McKael/madonctl"
+
+// defaultConfigFile is the path to the default configuration file
const defaultConfigFile = "$HOME/.config/" + AppName + "/" + AppName + ".yaml"
+// Madon API client
+var gClient *madon.Client
+
+// Options
var cfgFile string
var safeMode bool
var instanceURL, appID, appSecret string
var login, password, token string
-var gClient *madon.Client
var verbose bool
var outputFormat string
var outputTemplate, outputTemplateFile string