shithub: hell

Download patch

ref: 6bc49eaa4e79a09e0adf12006162374b3fc48c62
parent: f02f6adb3fbd547fb52e13b86925469bae0c6a2a
author: penny <penny@limitedideas.org>
date: Wed Sep 3 19:12:46 EDT 2025

gofmt pass

--- a/hellclient.go
+++ b/hellclient.go
@@ -18,9 +18,9 @@
 )
 
 type postref struct {
-	prefix string
-	ref    string
-	postmap    map[string]*mastodon.Status
+	prefix  string
+	ref     string
+	postmap map[string]*mastodon.Status
 }
 
 type Hellclient struct {
@@ -34,7 +34,10 @@
 	recentpost  *mastodon.Status
 	preferences *Hellprefs
 
-	homeMap      map[string]*mastodon.Status
+	//Global status map for status indexes
+	//Needs to be converted to a postref struct
+	homeMap map[string]*mastodon.Status
+	//Contextual indexes for commands
 	ctxref       *postref
 	urlMap       map[string][]string
 	debugMap     map[string]interface{}
@@ -71,10 +74,10 @@
 	}()
 
 	homeMap := make(map[string]*mastodon.Status)
-	
+
 	ctxref := &postref{
-		prefix: "?",
-		ref:    "a",
+		prefix:  "?",
+		ref:     "a",
 		postmap: homeMap,
 	}
 	debugMap := make(map[string]interface{})
--- a/mastodon.go
+++ b/mastodon.go
@@ -254,7 +254,7 @@
 }
 
 func (hc *Hellclient) printPostS(ref postref, post *mastodon.Status) *mastodon.Status {
-	return hc.printPostDetailed(ref.prefix + ref.ref, post, "")
+	return hc.printPostDetailed(ref.prefix+ref.ref, post, "")
 }
 
 func (hc *Hellclient) printAndIncrement(ref *postref, post *mastodon.Status) (returnPost *mastodon.Status) {
--- a/notifications.go
+++ b/notifications.go
@@ -2,21 +2,22 @@
 
 import (
 	"context"
-	
+
 	"github.com/mattn/go-mastodon"
 )
+
 func (hc *Hellclient) GetUnreadNotifications() (notifications []*mastodon.Notification, err error) {
 	markers, err := hc.client.GetTimelineMarkers(context.Background(), []string{"notifications"})
 	if err != nil {
 		return
 	}
-	
+
 	LastID := markers["notifications"].LastID
-	
-	page := &mastodon.Pagination {SinceID: LastID}
-	
+
+	page := &mastodon.Pagination{SinceID: LastID}
+
 	notifications, err = hc.client.GetNotificationsExclude(context.Background(), nil, page)
-	
+
 	return
 }
 
@@ -23,9 +24,8 @@
 func (hc *Hellclient) PrintNotifications(notifications []*mastodon.Notification) {
 
 	for _, notification := range notifications {
-			PrintObjectProperties(notification, hc.debugMap)
+		PrintObjectProperties(notification, hc.debugMap)
 	}
 
-	
 	return
-}
\ No newline at end of file
+}
--