utils.go: toInt() -> ToInt(); toBool() -> ToBool()

This commit is contained in:
2024-06-10 19:03:39 +02:00
parent 0bb4c96481
commit 9745a5d909
8 changed files with 24 additions and 24 deletions
+2 -2
View File
@@ -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 {