Standard library / reflect
reflect.Value.CanFloat()
Report whether Float may be called without panic. Expected stdout: 'true\n'.
Formal Syntax & Structure
go syntaxgo
func (v Value) CanFloat() boolReturn Value
bool
Report whether Float may be called without panic.
Working Example
Example Snippetgo
package main
import ( "fmt" "reflect")
func main() { fmt.Println(reflect.ValueOf(float32(1)).CanFloat()) }