Standard library / reflect

reflect.Value.Uint()

Read an unsigned integer as uint64; other kinds panic. Expected stdout: '7\n'.

Formal Syntax & Structure

go syntaxgo
func (v Value) Uint() uint64

Return Value

uint64

Read an unsigned integer as uint64; other kinds panic.

Working Example

Example Snippetgo
package main
import (  "fmt"  "reflect")
func main() { fmt.Println(reflect.ValueOf(uint16(7)).Uint()) }
Go Reference