ref: 88c2f84782b143700520a34822df756bc71f796f
parent: 613aaa101f1ca88bbfcd9d6fa168a69115c16109
author: penny <penny@limitedideas.org>
date: Sat Aug 2 16:25:11 EDT 2025
goimports pass
--- a/commands.go
+++ b/commands.go
@@ -19,10 +19,10 @@
arguments = input
return
}
-
+
inputcommand, _, hasargument := strings.Cut(input[1:], " ")
-
- if(!hasargument) {+
+ if !hasargument {inputcommand = input[1:]
}
--- a/filehandler.go
+++ b/filehandler.go
@@ -2,7 +2,6 @@
import (
"fmt"
- "github.com/mattn/go-mastodon"
"io"
"net/http"
"net/url"
@@ -10,6 +9,8 @@
"os/exec"
"path"
"strings"
+
+ "github.com/mattn/go-mastodon"
)
func previewPostImages(target *mastodon.Status, commandstring string) (err error) {@@ -54,7 +55,6 @@
continue
}
fmt.Printf("Downloaded: %v\n", download.Name())-
}
if err != nil {--- a/format.go
+++ b/format.go
@@ -1,8 +1,10 @@
package main
-//import "fmt"
-import "strings"
-import "github.com/chzyer/readline"
+import (
+ "strings"
+
+ "github.com/chzyer/readline"
+)
func hyphenate(input string) string {width := readline.GetScreenWidth()
--- a/main.go
+++ b/main.go
@@ -3,12 +3,13 @@
import (
"context"
"fmt"
- "github.com/chzyer/readline"
- "github.com/mattn/go-mastodon"
"io"
"os"
"os/exec"
"strings"
+
+ "github.com/chzyer/readline"
+ "github.com/mattn/go-mastodon"
)
func main() {@@ -139,13 +140,13 @@
cmd.Run()
case "preview":
err := previewPostImages(postItem, "qlmanage -p")
- if(err != nil) {+ if err != nil { fmt.Printf("Image preview failed: %v\n", err)}
case "download":
-
+
savePostImages(postItem, "/Users/penny/Downloads/")
-
+
case "reply":
if currentUser.ID == postItem.Account.ID {recentpost, err = postReply(content, account, *client, postItem.Visibility, postItem.ID)
--- a/mastodon.go
+++ b/mastodon.go
@@ -4,13 +4,14 @@
"bytes"
"context"
"fmt"
+ "log"
+ "net/url"
+ "strings"
+
"github.com/chzyer/readline"
"github.com/k3a/html2text"
"github.com/mattn/go-mastodon"
"golang.org/x/net/html"
- "log"
- "net/url"
- "strings"
)
func ConfigureClient() *mastodon.Client {--- a/references.go
+++ b/references.go
@@ -1,8 +1,9 @@
package main
import (
- "github.com/mattn/go-mastodon"
"strings"
+
+ "github.com/mattn/go-mastodon"
)
var charSequence = []rune{'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'}--
⑨