Prefer short declaration over make.
This commit is contained in:
parent
9568b3fd69
commit
ff130af80a
@ -24,7 +24,7 @@ func (s *Stmts) Close() {
|
|||||||
// New will create a Stmts from the pass queries. Each string query will be prepared
|
// New will create a Stmts from the pass queries. Each string query will be prepared
|
||||||
// and mapped to the same key.
|
// and mapped to the same key.
|
||||||
func New(ctx context.Context, db *sql.DB, sqlStmts map[StmtKey]string) (Stmts, error) {
|
func New(ctx context.Context, db *sql.DB, sqlStmts map[StmtKey]string) (Stmts, error) {
|
||||||
s := make(Stmts)
|
s := Stmts{}
|
||||||
|
|
||||||
// Iterate through SQL statements and prepare them
|
// Iterate through SQL statements and prepare them
|
||||||
for key, q := range sqlStmts {
|
for key, q := range sqlStmts {
|
||||||
|
Loading…
Reference in New Issue
Block a user