From b48d768ecec7d3f3d96fcc0500ab15ad524b2171 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Mon, 8 Jul 2024 15:08:44 +0200 Subject: [PATCH] lint --- indexer/postgres/column.go | 2 +- indexer/postgres/enum.go | 3 +-- indexer/postgres/module_mgr.go | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/indexer/postgres/column.go b/indexer/postgres/column.go index a2e65ea0b6db..b5a2b47613c1 100644 --- a/indexer/postgres/column.go +++ b/indexer/postgres/column.go @@ -64,7 +64,7 @@ func writeNullability(writer io.Writer, nullable bool) error { // simpleColumnType returns the postgres column type for the kind for simple types. func simpleColumnType(kind schema.Kind) string { - //nolint:goconst + //nolint:goconst // adding constants for these postgres type names would impede readability switch kind { case schema.StringKind: return "TEXT" diff --git a/indexer/postgres/enum.go b/indexer/postgres/enum.go index 7799e23d85f3..eb108c2db796 100644 --- a/indexer/postgres/enum.go +++ b/indexer/postgres/enum.go @@ -17,8 +17,7 @@ func (m *ModuleManager) CreateEnumType(ctx context.Context, conn DBConn, enum sc var res interface{} if err := row.Scan(&res); err != nil { if err != sql.ErrNoRows { - // use %v instead of %w for go 1.12 compat - return fmt.Errorf("failed to check if enum type %q exists: %v", typeName, err) //nolint:errorlint + return fmt.Errorf("failed to check if enum type %q exists: %v", typeName, err) //nolint:errorlint // using %v for go 1.12 compat } } else { // the enum type already exists diff --git a/indexer/postgres/module_mgr.go b/indexer/postgres/module_mgr.go index f7ab937a1798..3ab673f63939 100644 --- a/indexer/postgres/module_mgr.go +++ b/indexer/postgres/module_mgr.go @@ -48,8 +48,7 @@ func (m *ModuleManager) InitializeSchema(ctx context.Context, conn DBConn) error m.tables[typ.Name] = tm err := tm.CreateTable(ctx, conn) if err != nil { - // use %v instead of %w for go 1.12 compat - return fmt.Errorf("failed to create table for %s in module %s: %v", typ.Name, m.moduleName, err) //nolint:errorlint + return fmt.Errorf("failed to create table for %s in module %s: %v", typ.Name, m.moduleName, err) //nolint:errorlint // using %v for go 1.12 compat } }