diff --git a/.golangci.yaml b/.golangci.yaml index fdc52ec..e70b5d4 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -6,11 +6,8 @@ linters: enable: - errname - gofmt - - goimports + - gci - sqlclosecheck - stylecheck - unconvert - unparam - -issues: - fix: true diff --git a/README.md b/README.md index 6b7a14c..2c8eaf2 100644 --- a/README.md +++ b/README.md @@ -30,13 +30,13 @@ import ( ) func main() { - q, err := pgmq.New(context.Background(), "postgres://postgres:password@localhost:5432/postgres") + ctx := context.Background() + + q, err := pgmq.New(ctx, "postgres://postgres:password@localhost:5432/postgres") if err != nil { panic(err) } - ctx := context.Background() - err = q.CreateQueue(ctx, "my_queue") if err != nil { panic(err) diff --git a/pgmq_test.go b/pgmq_test.go index 66e96c6..34588eb 100644 --- a/pgmq_test.go +++ b/pgmq_test.go @@ -8,13 +8,13 @@ import ( "testing" "time" + "github.com/craigpastro/pgmq-go/mocks" "github.com/craigpastro/retrier" "github.com/jackc/pgx/v5/pgconn" "github.com/stretchr/testify/require" "github.com/testcontainers/testcontainers-go" "github.com/testcontainers/testcontainers-go/wait" "go.uber.org/mock/gomock" - "github.com/craigpastro/pgmq-go/mocks" ) var q *PGMQ