The query()
function of database/sql package is accepting variadic parameter of interface{}
or any
type, which means it accepts variable numbers of interface{}
. To unpack the []interface{}
, use the ...
, like:
rows, err = db.query(statement, args...)