Standard library / reflect
reflect.Value.Bool()
Read a boolean value; non-Bool kinds panic. Expected stdout: 'true\n'.
Formal Syntax & Structure
go syntaxgo
func (v Value) Bool() boolReturn Value
bool
Read a boolean value; non-Bool kinds panic.
Working Example
Example Snippetgo
package main
import ( "fmt" "reflect")
func main() { fmt.Println(reflect.ValueOf(true).Bool()) }