mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-29 17:46:15 -06:00
chore: go fmt ./...
This commit is contained in:
parent
f4f83f9f0e
commit
0306fa46f8
1 changed files with 4 additions and 4 deletions
|
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue