reflection in Go

In Go, reflection is provided by the reflect package. It defines two important types, Type and Value. 
A Type represents a Go type. The reflect.TypeOf function accepts any interface{} and returns its dynamic type as a reflect.Type:
<pre><code>
t := reflect.TypeOf(3) // a reflect.Type
fmt.Println(t.String()) // "int"
fmt.Println(t) // "int"
</code></pre>
The other important type in the reflect package is Value . A reflect.Value can hold a value of any type. The reflect.ValueOf function accepts any interface{} and returns a reflect.Value containing the interface’s dynamic value.
<pre><code>
v := reflect.ValueOf(3) // a reflect.Value
fmt.Println(v) // "3"
fmt.Printf("%v\n", v) // "3"
fmt.Println(v.String()) // NOTE: "<int Value>"
</code></pre>