From e7c3ac253315fa842ca73e189950491248a798a7 Mon Sep 17 00:00:00 2001 From: Sevki Date: Fri, 20 Mar 2020 15:37:09 +0000 Subject: [PATCH 1/2] Id => ID `Id` is causing the linters to complain when implementing the db interface. from the go project https://github.com/golang/go/wiki/CodeReviewComments#initialisms > This rule also applies to "ID" when it is short for "identifier" (which is pretty much all cases when it's not the "id" as in "ego", "superego"), so write "appID" instead of "appId". --- pub/database.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pub/database.go b/pub/database.go index 10b8484..5208b08 100644 --- a/pub/database.go +++ b/pub/database.go @@ -108,13 +108,13 @@ type Database interface { // // The library makes this call only after acquiring a lock first. SetOutbox(c context.Context, inbox vocab.ActivityStreamsOrderedCollectionPage) error - // NewId creates a new IRI id for the provided activity or object. The + // NewID creates a new IRI id for the provided activity or object. The // implementation does not need to set the 'id' property and simply // needs to determine the value. // // The go-fed library will handle setting the 'id' property on the // activity or object provided with the value returned. - NewId(c context.Context, t vocab.Type) (id *url.URL, err error) + NewID(c context.Context, t vocab.Type) (id *url.URL, err error) // Followers obtains the Followers Collection for an actor with the // given id. // From 7c20a89a610161fe9a1c2cff0829751c6114497d Mon Sep 17 00:00:00 2001 From: Sevki Date: Sun, 5 Jul 2020 20:07:47 +0100 Subject: [PATCH 2/2] Update database.go --- pub/database.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pub/database.go b/pub/database.go index 79a187d..d5673f1 100644 --- a/pub/database.go +++ b/pub/database.go @@ -107,7 +107,7 @@ type Database interface { // database entries. Separate calls to Create will do that. // // The library makes this call only after acquiring a lock first. - SetOutbox(c context.Context, inbox vocab.ActivityStreamsOrderedCollectionPage) error + SetOutbox(c context.Context, outbox vocab.ActivityStreamsOrderedCollectionPage) error // NewID creates a new IRI id for the provided activity or object. The // implementation does not need to set the 'id' property and simply // needs to determine the value.