Skip to content

Commit

Permalink
refactor: Changing the mockgen arg
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Boutour <[email protected]>
  • Loading branch information
ViBiOh committed Jan 16, 2025
1 parent 00e927b commit 6b1d816
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/amqp/amqp.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"go.opentelemetry.io/otel/trace"
)

//go:generate mockgen -source amqp.go -destination ../mocks/amqp.go -package mocks -mock_names Connection=AMQPConnection
//go:generate mockgen -source $GOFILE -destination ../mocks/$GOFILE -package mocks -mock_names Connection=AMQPConnection

var ErrNoConfig = errors.New("URI is required")

Expand Down
2 changes: 1 addition & 1 deletion pkg/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"go.opentelemetry.io/otel/trace"
)

//go:generate mockgen -source cache.go -destination ../mocks/cache.go -package mocks -mock_names RedisClient=RedisClient
//go:generate mockgen -source $GOFILE -destination ../mocks/$GOFILE -package mocks -mock_names RedisClient=RedisClient

var syncActionTimeout = time.Millisecond * 150

Expand Down
2 changes: 1 addition & 1 deletion pkg/cron/cron.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"go.opentelemetry.io/otel/trace"
)

//go:generate mockgen -source cron.go -destination ../mocks/cron.go -package mocks -mock_names Semaphore=Semaphore
//go:generate mockgen -source $GOFILE -destination ../mocks/$GOFILE -package mocks -mock_names Semaphore=Semaphore

type Semaphore interface {
Exclusive(context.Context, string, time.Duration, func(context.Context) error) (bool, error)
Expand Down
2 changes: 1 addition & 1 deletion pkg/db/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"go.opentelemetry.io/otel/trace"
)

//go:generate mockgen -source db.go -destination ../mocks/db.go -package mocks -mock_names Database=Database
//go:generate mockgen -source $GOFILE -destination ../mocks/$GOFILE -package mocks -mock_names Database=Database

type key struct{}

Expand Down

0 comments on commit 6b1d816

Please sign in to comment.