From 932702fbe1e886782c8e45ce792e04ceb3a434bf Mon Sep 17 00:00:00 2001 From: tsmethurst Date: Mon, 17 May 2021 19:03:29 +0200 Subject: [PATCH] linting --- internal/federation/federating_db.go | 4 ++-- internal/media/processvideo.go | 8 +++----- internal/message/fromfederatorprocess.go | 2 +- internal/typeutils/asextractionutil.go | 18 +++++++++--------- internal/typeutils/asinterfaces.go | 12 ++++++------ 5 files changed, 21 insertions(+), 23 deletions(-) diff --git a/internal/federation/federating_db.go b/internal/federation/federating_db.go index eac518474..f72c5e636 100644 --- a/internal/federation/federating_db.go +++ b/internal/federation/federating_db.go @@ -411,9 +411,9 @@ func (f *federatingDB) Create(ctx context.Context, asType vocab.Type) error { } fromFederatorChan <- gtsmodel.FromFederator{ - APObjectType: gtsmodel.ActivityStreamsNote, + APObjectType: gtsmodel.ActivityStreamsNote, APActivityType: gtsmodel.ActivityStreamsCreate, - GTSModel: status, + GTSModel: status, } } } diff --git a/internal/media/processvideo.go b/internal/media/processvideo.go index 645260977..a2debf648 100644 --- a/internal/media/processvideo.go +++ b/internal/media/processvideo.go @@ -18,8 +18,6 @@ package media -import "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" - -func (mh *mediaHandler) processVideoAttachment(data []byte, accountID string, contentType string, remoteURL string) (*gtsmodel.MediaAttachment, error) { - return nil, nil -} +// func (mh *mediaHandler) processVideoAttachment(data []byte, accountID string, contentType string, remoteURL string) (*gtsmodel.MediaAttachment, error) { +// return nil, nil +// } diff --git a/internal/message/fromfederatorprocess.go b/internal/message/fromfederatorprocess.go index 2a329c375..2dd8e9e3b 100644 --- a/internal/message/fromfederatorprocess.go +++ b/internal/message/fromfederatorprocess.go @@ -117,7 +117,7 @@ func (p *processor) dereferenceStatusFields(status *gtsmodel.Status) error { // This should be enough to pass along to the media processor. attachmentIDs := []string{} for _, a := range status.GTSMediaAttachments { - l.Debug("dereferencing attachment: %+v", a) + l.Debugf("dereferencing attachment: %+v", a) // it might have been processed elsewhere so check first if it's already in the database or not maybeAttachment := >smodel.MediaAttachment{} diff --git a/internal/typeutils/asextractionutil.go b/internal/typeutils/asextractionutil.go index 13cb43459..1c04272e0 100644 --- a/internal/typeutils/asextractionutil.go +++ b/internal/typeutils/asextractionutil.go @@ -361,15 +361,15 @@ func extractAttachment(i Attachmentable) (*gtsmodel.MediaAttachment, error) { return attachment, nil } -func extractBlurhash(i withBlurhash) (string, error) { - if i.GetTootBlurhashProperty() == nil { - return "", errors.New("blurhash property was nil") - } - if i.GetTootBlurhashProperty().Get() == "" { - return "", errors.New("empty blurhash string") - } - return i.GetTootBlurhashProperty().Get(), nil -} +// func extractBlurhash(i withBlurhash) (string, error) { +// if i.GetTootBlurhashProperty() == nil { +// return "", errors.New("blurhash property was nil") +// } +// if i.GetTootBlurhashProperty().Get() == "" { +// return "", errors.New("empty blurhash string") +// } +// return i.GetTootBlurhashProperty().Get(), nil +// } func extractHashtags(i withTag) ([]*gtsmodel.Tag, error) { tags := []*gtsmodel.Tag{} diff --git a/internal/typeutils/asinterfaces.go b/internal/typeutils/asinterfaces.go index d9f180757..c31a37a25 100644 --- a/internal/typeutils/asinterfaces.go +++ b/internal/typeutils/asinterfaces.go @@ -210,13 +210,13 @@ type withMediaType interface { GetActivityStreamsMediaType() vocab.ActivityStreamsMediaTypeProperty } -type withBlurhash interface { - GetTootBlurhashProperty() vocab.TootBlurhashProperty -} +// type withBlurhash interface { +// GetTootBlurhashProperty() vocab.TootBlurhashProperty +// } -type withFocalPoint interface { - // TODO -} +// type withFocalPoint interface { +// // TODO +// } type withHref interface { GetActivityStreamsHref() vocab.ActivityStreamsHrefProperty