chore: go fmt ./...

This commit is contained in:
alemi 2025-02-07 12:58:50 +01:00
commit 0306fa46f8
No known key found for this signature in database
GPG key ID: A4895B84D311642C

View file

@ -25,8 +25,8 @@ import (
"io" "io"
"net/http" "net/http"
"net/url" "net/url"
"strings"
"slices" "slices"
"strings"
apimodel "github.com/superseriousbusiness/gotosocial/internal/api/model" apimodel "github.com/superseriousbusiness/gotosocial/internal/api/model"
apiutil "github.com/superseriousbusiness/gotosocial/internal/api/util" apiutil "github.com/superseriousbusiness/gotosocial/internal/api/util"
@ -114,7 +114,7 @@ func dereferenceByAPIV1Instance(ctx context.Context, t *transport, iri *url.URL)
// Ensure that we can fetch this endpoint // Ensure that we can fetch this endpoint
if robots := resp.Header.Values("X-Robots-Tag"); slices.Contains(robots, "noindex") { if robots := resp.Header.Values("X-Robots-Tag"); slices.Contains(robots, "noindex") {
err := gtserror.Newf("can't fetch this endpoint: robots tags disallows it"); err := gtserror.Newf("can't fetch this endpoint: robots tags disallows it")
return nil, gtserror.SetNotPermitted(err) return nil, gtserror.SetNotPermitted(err)
} }
@ -276,7 +276,7 @@ func callNodeInfoWellKnown(ctx context.Context, t *transport, iri *url.URL) (*ur
// Ensure that we can fetch this endpoint // Ensure that we can fetch this endpoint
if robots := resp.Header.Values("X-Robots-Tag"); slices.Contains(robots, "noindex") { if robots := resp.Header.Values("X-Robots-Tag"); slices.Contains(robots, "noindex") {
err := gtserror.Newf("can't fetch this endpoint: robots tags disallows it"); err := gtserror.Newf("can't fetch this endpoint: robots tags disallows it")
return nil, gtserror.SetNotPermitted(err) return nil, gtserror.SetNotPermitted(err)
} }
@ -339,7 +339,7 @@ func callNodeInfo(ctx context.Context, t *transport, iri *url.URL) (*apimodel.No
// Ensure that we can fetch this endpoint // Ensure that we can fetch this endpoint
if robots := resp.Header.Values("X-Robots-Tag"); slices.Contains(robots, "noindex") { if robots := resp.Header.Values("X-Robots-Tag"); slices.Contains(robots, "noindex") {
err := gtserror.Newf("can't fetch this endpoint: robots tags disallows it"); err := gtserror.Newf("can't fetch this endpoint: robots tags disallows it")
return nil, gtserror.SetNotPermitted(err) return nil, gtserror.SetNotPermitted(err)
} }