Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(queues): remove unnecessary line breaks in SignalWithStartWorkflow function #15

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions queues/defs.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ import (
)

type (
// WorkflowSignal is a string alias intended for defining groups of workflow signals.
//
// Depraecated: Use Signal instead.
WorkflowSignal string

// Signal is a string alias intended for defining groups of workflow signals, "register" , "send_welcome_email" etc.
// It ensures consistency and code clarity. The Signal type provides methods for conversion and serialization,
Expand All @@ -20,25 +16,6 @@ type (
Query string
)

func (s WorkflowSignal) String() string {
return string(s)
}

func (s WorkflowSignal) MarshalJSON() ([]byte, error) {
return json.Marshal(string(s))
}

func (s *WorkflowSignal) UnmarshalJSON(data []byte) error {
var str string
if err := json.Unmarshal(data, &str); err != nil {
return err
}

*s = WorkflowSignal(str)

return nil
}

func (s Signal) String() string {
return string(s)
}
Expand Down
4 changes: 1 addition & 3 deletions queues/queues.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,7 @@
return q.client.SignalWorkflow(ctx, q.WorkflowID(opts), "", signal.String(), args)
}

func (q *queue) SignalWithStartWorkflow(
ctx context.Context, opts wrk.Options, signal Signal, args any, fn any, payload ...any,
) (WorkflowRun, error) {
func (q *queue) SignalWithStartWorkflow(ctx context.Context, opts wrk.Options, signal Signal, args any, fn any, payload ...any) (WorkflowRun, error) {

Check warning on line 270 in queues/queues.go

View workflow job for this annotation

GitHub Actions / lint

line-length-limit: line is 150 characters, out of limit 140 (revive)
if q.client == nil {
return nil, ErrClientNil
}
Expand Down
Loading