From c1ddc5a48d1f1aafaba28d9f0fd4cf76f8af99ec Mon Sep 17 00:00:00 2001 From: Safeer Jiwan Date: Mon, 4 Nov 2024 16:25:55 -0800 Subject: [PATCH] lint --- backend/controller/pubsub/internal/dal/dal.go | 10 ++++------ backend/controller/timeline/events_pubsub_consume.go | 2 +- backend/controller/timeline/events_pubsub_publish.go | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/backend/controller/pubsub/internal/dal/dal.go b/backend/controller/pubsub/internal/dal/dal.go index d7b618dfb3..0313fe1fa4 100644 --- a/backend/controller/pubsub/internal/dal/dal.go +++ b/backend/controller/pubsub/internal/dal/dal.go @@ -150,17 +150,15 @@ func (d *DAL) ProgressSubscriptions(ctx context.Context, eventConsumptionDelay t return 0, err } if !nextCursor.Ready { - s := fmt.Sprintf("Skipping subscription %s because event is too new", subscription.Key) - logger.Tracef(s) - enqueueTimelineEvent(optional.None[schema.RefKey](), optional.Some(s)) + logger.Tracef("Skipping subscription %s because event is too new", subscription.Key) + enqueueTimelineEvent(optional.None[schema.RefKey](), optional.Some(fmt.Sprintf("Skipping subscription %s because event is too new", subscription.Key))) continue } subscriber, err := tx.db.GetRandomSubscriber(ctx, subscription.Key) if err != nil { - s := fmt.Sprintf("no subscriber for subscription %s", subscription.Key) - logger.Tracef(s) - enqueueTimelineEvent(optional.None[schema.RefKey](), optional.Some(s)) + logger.Tracef("no subscriber for subscription %s", subscription.Key) + enqueueTimelineEvent(optional.None[schema.RefKey](), optional.Some(fmt.Sprintf("no subscriber for subscription %s", subscription.Key))) continue } diff --git a/backend/controller/timeline/events_pubsub_consume.go b/backend/controller/timeline/events_pubsub_consume.go index 881f45b380..66904dfae0 100644 --- a/backend/controller/timeline/events_pubsub_consume.go +++ b/backend/controller/timeline/events_pubsub_consume.go @@ -33,7 +33,7 @@ type PubSubConsume struct { Error optional.Option[string] } -func (e *PubSubConsume) toEvent() (Event, error) { +func (e *PubSubConsume) toEvent() (Event, error) { //nolint:unparam return &PubSubConsumeEvent{ PubSubConsume: *e, Duration: time.Since(e.Time), diff --git a/backend/controller/timeline/events_pubsub_publish.go b/backend/controller/timeline/events_pubsub_publish.go index 336b15a863..7541641cad 100644 --- a/backend/controller/timeline/events_pubsub_publish.go +++ b/backend/controller/timeline/events_pubsub_publish.go @@ -36,7 +36,7 @@ type PubSubPublish struct { Error optional.Option[string] } -func (e *PubSubPublish) toEvent() (Event, error) { +func (e *PubSubPublish) toEvent() (Event, error) { //nolint:unparam return &PubSubPublishEvent{ PubSubPublish: *e, Duration: time.Since(e.Time),