From c3fb34d5b4b3683cd1ce39684f7fdec30c51c551 Mon Sep 17 00:00:00 2001 From: Clemens Date: Mon, 13 May 2024 12:00:16 +0200 Subject: [PATCH] fixed some comments --- models/forgefed/federationhost.go | 4 ++-- models/forgefed/nodeinfo.go | 2 +- modules/activitypub/client.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/models/forgefed/federationhost.go b/models/forgefed/federationhost.go index 98d9f4f1b9..b60c0c39cf 100644 --- a/models/forgefed/federationhost.go +++ b/models/forgefed/federationhost.go @@ -23,7 +23,7 @@ type FederationHost struct { Updated timeutil.TimeStamp `xorm:"updated"` } -// Factory function for PersonID. Created struct is asserted to be valid +// Factory function for FederationHost. Created struct is asserted to be valid. func NewFederationHost(nodeInfo NodeInfo, hostFqdn string) (FederationHost, error) { result := FederationHost{ HostFqdn: strings.ToLower(hostFqdn), @@ -45,7 +45,7 @@ func (host FederationHost) Validate() []string { result = append(result, fmt.Sprintf("HostFqdn has to be lower case but was: %v", host.HostFqdn)) } if !host.LatestActivity.IsZero() && host.LatestActivity.After(time.Now().Add(10*time.Minute)) { - result = append(result, fmt.Sprintf("Latest Activity may not be far futurer: %v", host.LatestActivity)) + result = append(result, fmt.Sprintf("Latest Activity cannot be in the far future: %v", host.LatestActivity)) } return result diff --git a/models/forgefed/nodeinfo.go b/models/forgefed/nodeinfo.go index bb56570635..66d2eca7aa 100644 --- a/models/forgefed/nodeinfo.go +++ b/models/forgefed/nodeinfo.go @@ -33,7 +33,7 @@ type NodeInfoWellKnown struct { Href string } -// Factory function for PersonID. Created struct is asserted to be valid +// Factory function for NodeInfoWellKnown. Created struct is asserted to be valid. func NewNodeInfoWellKnown(body []byte) (NodeInfoWellKnown, error) { result, err := NodeInfoWellKnownUnmarshalJSON(body) if err != nil { diff --git a/modules/activitypub/client.go b/modules/activitypub/client.go index 4962ad79a4..d47990430d 100644 --- a/modules/activitypub/client.go +++ b/modules/activitypub/client.go @@ -129,7 +129,7 @@ func (c *Client) Post(b []byte, to string) (resp *http.Response, err error) { } // Create an http GET request with forgejo/gitea specific headers -func (c *Client) Get(to string) (resp *http.Response, err error) { // ToDo: we might not need the b parameter +func (c *Client) Get(to string) (resp *http.Response, err error) { var req *http.Request emptyBody := []byte{0} if req, err = c.NewRequest(http.MethodGet, emptyBody, to); err != nil {