]> Vexing Labs - dead-tooter.git/commitdiff
fix missing pointer
authorAdam Shamblin <adam@vexingworkshop.com>
Tue, 6 Dec 2022 07:22:09 +0000 (00:22 -0700)
committerAdam Shamblin <adam@vexingworkshop.com>
Tue, 6 Dec 2022 07:22:09 +0000 (00:22 -0700)
main.go
pkg/mastodon/application.go

diff --git a/main.go b/main.go
index 46540c1ca9ca0179f45663ca2e2c99d745b6a56d..54131b633456c1a3c4a1789846a860d66f93f9c6 100644 (file)
--- a/main.go
+++ b/main.go
@@ -7,19 +7,21 @@ import (
 )
 
 func main() {
-       //app := Application{}
-       //err := app.Load("dead-tooter")
-       app, err := mastodon.App{
-               ClientName:   "dead-tooter",
-               RedirectUris: "urn:ietf:wg:oauth:2.0:oob",
-               Scopes:       "read write follow push",
-               Website:      "https://dead-tooter.vexingworkshop.com",
-       }.Create()
+       app := mastodon.Application{}
+       err := app.Load("dead-tooter")
+       /*
+               app, err := mastodon.App{
+                       ClientName:   "dead-tooter",
+                       RedirectUris: "urn:ietf:wg:oauth:2.0:oob",
+                       Scopes:       "read write follow push",
+                       Website:      "https://dead-tooter.vexingworkshop.com",
+               }.Create()
+       */
 
        if err != nil {
                panic(err.Error())
        }
-       app.Save()
+       //app.Save()
 
        fmt.Printf("%v", app)
 
index b0064801b1aa0a6ef07981d410d1f3011c1066d8..d5cf67bcef1803212225186845e363ddd13cfdc6 100644 (file)
@@ -42,7 +42,7 @@ func (a Application) Save() {
 
 // Load will hydrate an Application instance based upon data stored in
 // a file.
-func (a Application) Load(name string) error {
+func (a *Application) Load(name string) error {
        data, err := os.ReadFile(configdir + name)
        if err != nil && os.IsNotExist(err) {
                panic(err.Error())