iterator interface chenged index and count members from int to tint 64
This commit is contained in:
@@ -75,3 +75,14 @@ func ToGoInt(value any, description string) (i int, err error) {
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func ToGoInt64(value any, description string) (i int64, err error) {
|
||||
if valueInt64, ok := value.(int64); ok {
|
||||
i = valueInt64
|
||||
} else if valueInt, ok := value.(int); ok {
|
||||
i = int64(valueInt)
|
||||
} else {
|
||||
err = fmt.Errorf("%s expected integer, got %s (%v)", description, TypeName(value), value)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user