iterator interface chenged index and count members from int to tint 64

This commit is contained in:
2026-05-01 17:15:18 +02:00
parent 75ed88915d
commit dacbec677a
13 changed files with 65 additions and 44 deletions
+11
View File
@@ -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
}