Sync w/ madon 1.4.0 -- add website parameter to application registration
authorMikael Berthe <mikael@lilotux.net>
Mon, 01 May 2017 15:04:08 +0200
changeset 55 e9df533a1c4f
parent 54 c31ca7e1ac24
child 56 5e261ce3ef20
Sync w/ madon 1.4.0 -- add website parameter to application registration
cmd/madon.go
cmd/root.go
--- 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