Standard library / reflect

reflect.Value.CanUint()

Report whether Uint may be called without panic. Expected stdout: 'true\n'.

Formal Syntax & Structure

go syntaxgo
func (v Value) CanUint() bool

Return Value

bool

Report whether Uint may be called without panic.

Working Example

Example Snippetgo
package main
import (  "fmt"  "reflect")
func main() { fmt.Println(reflect.ValueOf(uint8(1)).CanUint()) }
Go Reference