From 2cbacc2c0a6e77acb104d6197e394f2190bb4d9e Mon Sep 17 00:00:00 2001 From: Genki Sugawara Date: Wed, 2 Oct 2024 12:50:26 +0900 Subject: [PATCH] Fix for lint --- Makefile | 4 ++++ que.go | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 34f4b26..ec5fe8b 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,10 @@ test: vet vet: go vet ./... +.PHONY: lint +lint: + golangci-lint run + .PHONY: db db: psql -U postgres -h localhost -d postgres -c 'CREATE USER qgtest;' diff --git a/que.go b/que.go index c35971e..af50650 100644 --- a/que.go +++ b/que.go @@ -410,9 +410,9 @@ func (c *Client) LockJobContext(ctx context.Context, queue string) (*Job, error) // eventually causing the server to run out of locks. // // Also swallow the possible error, exactly like in Done. - conn.Raw(func(driverConn any) error { + conn.Raw(func(driverConn any) error { //nolint:errcheck pgxConn := driverConn.(*stdlib.Conn).Conn() - pgxConn.QueryRow(ctx, "que_unlock_job", j.ID).Scan(&ok) + pgxConn.QueryRow(ctx, "que_unlock_job", j.ID).Scan(&ok) //nolint:errcheck return nil }) continue