Skip to content

Commit

Permalink
refactor: moved args to util
Browse files Browse the repository at this point in the history
  • Loading branch information
aldy505 committed Jul 9, 2021
1 parent 75547d6 commit 724b943
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions util/arguments.go
Original file line number Diff line number Diff line change
@@ -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
}
File renamed without changes.

0 comments on commit 724b943

Please sign in to comment.