From e58d2d81226c4cc4110747305d083b67903d621c Mon Sep 17 00:00:00 2001 From: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com> Date: Thu, 8 Dec 2022 17:35:14 +0000 Subject: [chore] move caches to a separate State{} structure (#1078) * move caches to a separate State{} structure Signed-off-by: kim * fix call to log.Panic not using formatted call Signed-off-by: kim * move caches to use interfaces, to make switchouts easier in future Signed-off-by: kim * fix rebase issue Signed-off-by: kim * improve code comment Signed-off-by: kim * fix further issues after rebase Signed-off-by: kim * heh Signed-off-by: kim * add missing license text Signed-off-by: kim Signed-off-by: kim --- internal/typeutils/internal.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'internal/typeutils/internal.go') diff --git a/internal/typeutils/internal.go b/internal/typeutils/internal.go index ce2c942fd..f0c501fa9 100644 --- a/internal/typeutils/internal.go +++ b/internal/typeutils/internal.go @@ -2,7 +2,6 @@ package typeutils import ( "context" - "fmt" "time" "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" @@ -13,7 +12,6 @@ import ( func (c *converter) FollowRequestToFollow(ctx context.Context, f *gtsmodel.FollowRequest) *gtsmodel.Follow { showReblogs := *f.ShowReblogs notify := *f.Notify - return >smodel.Follow{ ID: f.ID, CreatedAt: f.CreatedAt, @@ -33,8 +31,9 @@ func (c *converter) StatusToBoost(ctx context.Context, s *gtsmodel.Status, boost if err != nil { return nil, err } - boostWrapperStatusURI := fmt.Sprintf("%s/%s", accountURIs.StatusesURI, boostWrapperStatusID) - boostWrapperStatusURL := fmt.Sprintf("%s/%s", accountURIs.StatusesURL, boostWrapperStatusID) + + boostWrapperStatusURI := accountURIs.StatusesURI + "/" + boostWrapperStatusID + boostWrapperStatusURL := accountURIs.StatusesURL + "/" + boostWrapperStatusID local := true if boostingAccount.Domain != "" { -- cgit v1.2.3