From 043b59ba03e5c3aa02b3a9aa7185e81f318afde5 Mon Sep 17 00:00:00 2001 From: Dale Hui Date: Thu, 9 Mar 2023 00:34:02 -0800 Subject: [PATCH] Remove deprecated linters and fix/ignore linting errors --- .golangci.yml | 4 +--- satomictest/error.go | 1 + satomicx/querier.go | 1 + savepointers/mock/mock.go | 1 + savepointers/mssql/mssql.go | 1 + savepointers/mysql/mysql.go | 1 + savepointers/postgres/postgres.go | 1 + savepointers/savepoint_name.go | 2 +- savepointers/savepointer.go | 1 + savepointers/savepointertest/savepointertest.go | 1 + savepointers/sqlite/sqlite.go | 1 + 11 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index c88dbba..09a7f72 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,13 +1,11 @@ linters: enable: - - golint - - interfacer + - revive - unconvert - dupl - goconst - gofmt - misspell - - maligned - unparam - nakedret - prealloc diff --git a/satomictest/error.go b/satomictest/error.go index c551375..b7fa9d0 100644 --- a/satomictest/error.go +++ b/satomictest/error.go @@ -1,3 +1,4 @@ +// Package satomictest provides test helper function package satomictest import ( diff --git a/satomicx/querier.go b/satomicx/querier.go index 1f38305..d5240b8 100644 --- a/satomicx/querier.go +++ b/satomicx/querier.go @@ -1,3 +1,4 @@ +// Package satomicx provides satomic capabilities that are compatible with sqlx package satomicx import ( diff --git a/savepointers/mock/mock.go b/savepointers/mock/mock.go index bb3a393..466c5d1 100644 --- a/savepointers/mock/mock.go +++ b/savepointers/mock/mock.go @@ -1,3 +1,4 @@ +// Package mock provides a mock Savepointer implementation package mock import ( diff --git a/savepointers/mssql/mssql.go b/savepointers/mssql/mssql.go index c1953b7..a950a7b 100644 --- a/savepointers/mssql/mssql.go +++ b/savepointers/mssql/mssql.go @@ -1,3 +1,4 @@ +// Package mssql implements a Savepointer for mssql package mssql import ( diff --git a/savepointers/mysql/mysql.go b/savepointers/mysql/mysql.go index 1866d38..5bc9159 100644 --- a/savepointers/mysql/mysql.go +++ b/savepointers/mysql/mysql.go @@ -1,3 +1,4 @@ +// Package mysql implements a Savepointer for mysql package mysql import ( diff --git a/savepointers/postgres/postgres.go b/savepointers/postgres/postgres.go index e715654..eeaa5c9 100644 --- a/savepointers/postgres/postgres.go +++ b/savepointers/postgres/postgres.go @@ -1,3 +1,4 @@ +// Package postgres implements a Savepointer for postgres package postgres import ( diff --git a/savepointers/savepoint_name.go b/savepointers/savepoint_name.go index 6357e5a..4fe98d0 100644 --- a/savepointers/savepoint_name.go +++ b/savepointers/savepoint_name.go @@ -19,7 +19,7 @@ func init() { if err != nil { panic(err) } - _rand = rand.New(dhrand.NewLockedSource(seed)) + _rand = rand.New(dhrand.NewLockedSource(seed)) //nolint:gosec } // GenSavepointName quickly generates a unique savepoint name diff --git a/savepointers/savepointer.go b/savepointers/savepointer.go index 81ded01..9ba160b 100644 --- a/savepointers/savepointer.go +++ b/savepointers/savepointer.go @@ -1,3 +1,4 @@ +// Package savepointers provides the Savepointer interface package savepointers // Savepointer provides an interface for creating SQL statements for managing savepoints diff --git a/savepointers/savepointertest/savepointertest.go b/savepointers/savepointertest/savepointertest.go index 0951e70..3a8da47 100644 --- a/savepointers/savepointertest/savepointertest.go +++ b/savepointers/savepointertest/savepointertest.go @@ -1,3 +1,4 @@ +// Package savepointertest provides tests for Savepointer implementations package savepointertest import ( diff --git a/savepointers/sqlite/sqlite.go b/savepointers/sqlite/sqlite.go index d245a38..e3b0974 100644 --- a/savepointers/sqlite/sqlite.go +++ b/savepointers/sqlite/sqlite.go @@ -1,3 +1,4 @@ +// Package sqlite implements a Savepointer for sqlite package sqlite import (