From fbd1aeedc88cdd5795c26ea29414c6d60945772b Mon Sep 17 00:00:00 2001 From: Vernon Keenan Date: Tue, 19 Jan 2021 17:17:06 -0800 Subject: [PATCH] no pointers! --- rules/contact.go | 4 ++-- rules/lead.go | 2 +- rules/new-lead.go | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/rules/contact.go b/rules/contact.go index 44d12be..69f0980 100644 --- a/rules/contact.go +++ b/rules/contact.go @@ -15,7 +15,7 @@ import ( ) // StoreContactActivity posts a new contact object to datastore -func StoreContactActivity(ctx workflow.Context, w app.ContactActivityWrapper) error { //nolint:gocritic // what we want +func StoreContactActivity(ctx workflow.Context, w app.ContactActivityWrapper) error { //nolint:gocritic // don't care obj := &crm_models.Contact{ AccountID: w.AccountID, AssistantName: w.AssistantName, @@ -67,7 +67,7 @@ func StoreContactActivity(ctx workflow.Context, w app.ContactActivityWrapper) er } // NotifyContactActivity sends an email to a new lead -func NotifyContactActivity(ctx context.Context, w *app.ContactActivityWrapper) error { +func NotifyContactActivity(ctx context.Context, w app.ContactActivityWrapper) error { //nolint:dupl,gocritic,lll // todo #2 need email templates sugar.Info("workflow.notifyContact: 📥") var buf bytes.Buffer const textBody = ` diff --git a/rules/lead.go b/rules/lead.go index d5d10d2..6dec12d 100644 --- a/rules/lead.go +++ b/rules/lead.go @@ -59,7 +59,7 @@ func StoreLeadActivity(ctx workflow.Context, w app.LeadActivityWrapper) error { } // NotifyLeadActivity sends an email to a new lead -func NotifyLeadActivity(ctx context.Context, w *app.LeadActivityWrapper) error { +func NotifyLeadActivity(ctx context.Context, w app.LeadActivityWrapper) error { //nolint:dupl,gocritic,lll // todo #2 need email templates sugar.Info("workflow.notifyLead: 📥") var buf bytes.Buffer const textBody = ` diff --git a/rules/new-lead.go b/rules/new-lead.go index b4d0722..0b8de96 100644 --- a/rules/new-lead.go +++ b/rules/new-lead.go @@ -9,12 +9,15 @@ import ( // NewLeadWorkflowWrapper wraps a Lead with auth and saga info type NewLeadWorkflowWrapper struct { + APIKey string + SagaID string + SagaType string + // // Address crm_models.Address Company string Description string Email string FirstName string - ID string LastName string MobilePhone string Name string @@ -33,9 +36,6 @@ type NewLeadWorkflowWrapper struct { UTMSource string UTMTerm string Website string - APIKey string - SagaID string - SagaType string } // NewLeadWorkflow is a Temporal workflow