Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronc committed Jul 8, 2024
1 parent 8c79a6c commit b48d768
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion indexer/postgres/column.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 1 addition & 2 deletions indexer/postgres/enum.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions indexer/postgres/module_mgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down

0 comments on commit b48d768

Please sign in to comment.