Skip to content

Commit

Permalink
Use fmt.Errorf() instead of errors.New()
Browse files Browse the repository at this point in the history
  • Loading branch information
jrauh01 committed Dec 3, 2024
1 parent d6423af commit 1b746d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions database/query_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (qb *queryBuilder) UpsertStatement(stmt UpsertStatement) (string, int, erro
)
setFormat = `"%[1]s" = EXCLUDED."%[1]s"`
default:
return "", 0, errors.New(fmt.Sprintf("unsupported driver: %s", qb.dbDriver))
return "", 0, fmt.Errorf("unsupported database driver: %s", qb.dbDriver)
}

set := make([]string, 0, len(columns))
Expand Down Expand Up @@ -117,7 +117,7 @@ func (qb *queryBuilder) InsertIgnoreStatement(stmt InsertStatement) (string, err
fmt.Sprintf(":%s", strings.Join(columns, ", :")),
), nil
default:
return "", errors.New(fmt.Sprintf("unsupported driver: %s", qb.dbDriver))
return "", fmt.Errorf("unsupported database driver: %s", qb.dbDriver)
}
}

Expand Down

0 comments on commit 1b746d9

Please sign in to comment.