package generic import "reflect" func indirectType(typ reflect.Type) reflect.Type { if typ.Kind() == reflect.Ptr { return typ.Elem() } return typ }