packagemainimport ("fmt""reflect")funcprintIntResolvingPointers(v interface{}) { rv := reflect.ValueOf(v) typeName := rv.Type().String() name :=""for rv.Kind() == reflect.Ptr { name ="pointer to "+ name rv = rv.Elem() } name += rv.Type().String() fmt.Printf("Value: %d. Type: '%s' i.e. '%s'.\n\n", rv.Int(), name, typeName)}funcmain() { n :=3printIntResolvingPointers(n) n =4printIntResolvingPointers(&n) n =5 np :=&nprintIntResolvingPointers(&np)}/*----------OUTPUT-----------Value: 3. Type: 'int' i.e. 'int'.Value: 4. Type: 'pointer to int' i.e. '*int'.Value: 5. Type: 'pointer to pointer to int' i.e. '**int'.*/