Files
go-easy-utils/anyUtil/any_to_float_x_example_test.go
jeffery e9cc195c39 Feature/example test (#24)
example docs
2023-04-12 15:09:44 +08:00

24 lines
270 B
Go

package anyUtil
import "fmt"
func ExampleAnyToFloat32() {
f := "3"
res, _ := AnyToFloat32(f)
fmt.Printf("%T\n", res)
// Output:
// float32
}
func ExampleAnyToFloat64() {
f := "5"
res, _ := AnyToFloat64(f)
fmt.Printf("%T\n", res)
// Output:
// float64
}