update
This commit is contained in:
+7
-2
@@ -116,11 +116,16 @@ func (bucket Bucket) Foreach(f func(k, v []byte) error) {
|
||||
})
|
||||
}
|
||||
|
||||
var Int = func(s string) int {
|
||||
i, _ := strconv.Atoi(s)
|
||||
var Int = func(s interface{}) int {
|
||||
i, _ := strconv.Atoi(fmt.Sprint(s))
|
||||
return i
|
||||
}
|
||||
|
||||
var Int64 = func(s interface{}) int64 {
|
||||
i, _ := strconv.Atoi(fmt.Sprint(s))
|
||||
return int64(i)
|
||||
}
|
||||
|
||||
func (bucket Bucket) Create(i interface{}) error {
|
||||
s := reflect.ValueOf(i).Elem()
|
||||
id := s.FieldByName("ID")
|
||||
|
||||
Reference in New Issue
Block a user