Some Fixes
authorMikael Berthe <mikael@lilotux.net>
Wed, 12 Apr 2017 17:33:17 +0200
changeset 84 519be52bfced
parent 83 adc39ae774c0
child 85 abf0f5e40281
Some Fixes
app.go
cmd/gondole-cli/main.go
--- a/app.go	Wed Apr 12 16:40:02 2017 +0200
+++ b/app.go	Wed Apr 12 17:33:17 2017 +0200
@@ -32,8 +32,9 @@
 	}
 
 	g = &Client{
-		Name:    name,
-		APIBase: apiPath,
+		Name:        name,
+		APIBase:     apiPath,
+		InstanceURL: instanceURL,
 	}
 
 	req := g.prepareRequest("apps")
@@ -58,10 +59,6 @@
 		log.Fatalf("error can not register app: %v", err)
 	}
 
-	if err != nil {
-		log.Fatalf("error: can not write token for %s", name)
-	}
-
 	g.ID = resp.ClientID
 	g.Secret = resp.ClientSecret
 
--- a/cmd/gondole-cli/main.go	Wed Apr 12 16:40:02 2017 +0200
+++ b/cmd/gondole-cli/main.go	Wed Apr 12 17:33:17 2017 +0200
@@ -26,7 +26,7 @@
 	defaultInstanceURL = "https://mastodon.social"
 )
 
-// Config holds our parameters
+// Server holds our application details
 type Server struct {
 	ID          string `json:"id"`
 	Name        string `json:"name"`