utils.go: toInt() -> ToInt(); toBool() -> ToBool()
This commit is contained in:
@@ -86,7 +86,7 @@ func numAsFloat(v any) (f float64) {
|
||||
return
|
||||
}
|
||||
|
||||
func toBool(v any) (b bool, ok bool) {
|
||||
func ToBool(v any) (b bool, ok bool) {
|
||||
ok = true
|
||||
switch x := v.(type) {
|
||||
case string:
|
||||
@@ -201,7 +201,7 @@ func CloneFilteredMap[K comparable, V any](source map[K]V, filter func(key K) (a
|
||||
return CopyFilteredMap(dest, source, filter)
|
||||
}
|
||||
|
||||
func toInt(value any, description string) (i int, err error) {
|
||||
func ToInt(value any, description string) (i int, err error) {
|
||||
if valueInt64, ok := value.(int64); ok {
|
||||
i = int(valueInt64)
|
||||
} else if valueInt, ok := value.(int); ok {
|
||||
|
||||
Reference in New Issue
Block a user