code: func baseType(arg reflect.Type) (reflect.Type, int) {
  	var numIndirects int
  	for arg.Kind() == reflect.Ptr {
  		arg = arg.Elem()
  		numIndirects++
  	}
  	return arg, numIndirects
  }
docs: // baseType returns the type of the argument after indirecting through all
  // pointers along with how many indirections were necessary.