-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinternal.go
More file actions
34 lines (31 loc) · 720 Bytes
/
Copy pathinternal.go
File metadata and controls
34 lines (31 loc) · 720 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package bob
// createArgs should create an argument []interface{} for SQL query
// I'm using the idiot approach for creating args
func createArgs(keys ...interface{}) []interface{} {
var args []interface{}
for _, v := range keys {
if v == "" {
continue
}
args = append(args, v)
}
return args
}
// isIn checks if an array have a value
// func isIn(arr []string, value string) bool {
// for _, item := range arr {
// if item == value {
// return true
// }
// }
// return false
// }
// // findPosition search for value position on an array
// func findPosition(arr []string, value string) int {
// for i, item := range arr {
// if item == value {
// return i
// }
// }
// return -1
// }