Go fmt files

master
Matt Baer 2024-08-30 17:27:33 -04:00
parent 5c9098bae7
commit 40cadd7842
4 changed files with 3 additions and 5 deletions

View File

@ -325,7 +325,6 @@ func (a *Actor) newID() (hash string, url string) {
// TODO // TODO
// CreateNote posts an activityPub note to our followers // CreateNote posts an activityPub note to our followers
//
func (a *Actor) CreateNote(content, inReplyTo string) { func (a *Actor) CreateNote(content, inReplyTo string) {
// for now I will just write this to the outbox // for now I will just write this to the outbox
hash, id := a.newItemID() hash, id := a.newItemID()

View File

@ -241,7 +241,7 @@ func Serve(actors map[string]Actor) {
// pixelfed doesn't return the original follow thus the id is wrong so we // pixelfed doesn't return the original follow thus the id is wrong so we
// need to just check if we requested this actor // need to just check if we requested this actor
if _, ok := actor.requested[acceptor]; !ok { if _, ok := actor.requested[acceptor]; !ok {
log.Info("We never requested this follow from " + acceptor +", ignoring the Accept") log.Info("We never requested this follow from " + acceptor + ", ignoring the Accept")
return return
} }
// if pixelfed fixes https://github.com/pixelfed/pixelfed/issues/1710 we should uncomment // if pixelfed fixes https://github.com/pixelfed/pixelfed/issues/1710 we should uncomment

View File

@ -22,7 +22,6 @@ type RemoteActor struct {
// all the info required for an actor we want to // all the info required for an actor we want to
// interact with (not essentially sitting in our instance) // interact with (not essentially sitting in our instance)
func NewRemoteActor(iri string) (RemoteActor, error) { func NewRemoteActor(iri string) (RemoteActor, error) {
info, err := get(iri) info, err := get(iri)
if err != nil { if err != nil {
log.Info("Couldn't get remote actor information") log.Info("Couldn't get remote actor information")

View File

@ -23,7 +23,7 @@ func isSuccess(code int) bool {
code == http.StatusNoContent code == http.StatusNoContent
} }
//PrettyPrint maps // PrettyPrint maps
func PrettyPrint(themap map[string]interface{}) { func PrettyPrint(themap map[string]interface{}) {
b, err := json.MarshalIndent(themap, "", " ") b, err := json.MarshalIndent(themap, "", " ")
if err != nil { if err != nil {
@ -32,7 +32,7 @@ func PrettyPrint(themap map[string]interface{}) {
log.Print(string(b)) log.Print(string(b))
} }
//PrettyPrintJSON does what it's name says // PrettyPrintJSON does what it's name says
func PrettyPrintJSON(theJSON []byte) { func PrettyPrintJSON(theJSON []byte) {
dst := new(bytes.Buffer) dst := new(bytes.Buffer)
json.Indent(dst, theJSON, "", "\t") json.Indent(dst, theJSON, "", "\t")