diff --git a/util/arguments.go b/util/arguments.go new file mode 100644 index 0000000..96951db --- /dev/null +++ b/util/arguments.go @@ -0,0 +1,14 @@ +package util + +// createArgs should create an argument []interface{} for SQL query +// I'm using the idiot approach for creating args +func CreateArgs(keys ...string) []interface{} { + var args []interface{} + for _, v := range keys { + if v == "" { + continue + } + args = append(args, v) + } + return args +} diff --git a/util/util.go b/util/check.go similarity index 100% rename from util/util.go rename to util/check.go