bob/util/arguments.go

15 lines
309 B
Go
Raw Permalink Normal View History

2021-07-09 06:39:13 +00:00
package util
// createArgs should create an argument []interface{} for SQL query
// I'm using the idiot approach for creating args
2021-07-25 06:47:52 +00:00
func CreateArgs(keys ...interface{}) []interface{} {
2021-07-09 06:39:13 +00:00
var args []interface{}
for _, v := range keys {
if v == "" {
continue
}
args = append(args, v)
}
return args
}