Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mhmtszr committed Jul 9, 2024
1 parent 2f10233 commit 282db08
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pipeline_conditional_step.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ type ConditionalStep[K any] struct {
falsePipeline Pipeline[K]
}

var conditionNotFound = errors.New("condition not found in conditional step")
var errConditionNotFound = errors.New("condition not found in conditional step")

func (c ConditionalStep[K]) Execute(context K, next func(context K) error) error {
if c.condition == nil {
return conditionNotFound
return errConditionNotFound
}

var err error
Expand Down
7 changes: 4 additions & 3 deletions pipeline_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package pipeline_test

import (
"fmt"
"github.com/mhmtszr/pipeline"
"sync/atomic"
"testing"

"github.com/mhmtszr/pipeline"
)

type (
Expand All @@ -18,11 +19,11 @@ func (s Square) Execute(context *int, next func(context *int) error) error {
return next(context)
}

func (m Multiply) Execute(context *int, next func(context *int) error) error {
func (m Multiply) Execute(_ *int, _ func(context *int) error) error {
return fmt.Errorf("multiplyStepError")
}

func (s Square) ConcurrentExecute(context *atomic.Uint64) error {
func (s Square) ConcurrentExecute(_ *atomic.Uint64) error {
return fmt.Errorf("errorTest")
}

Expand Down

0 comments on commit 282db08

Please sign in to comment.