github.com/golang-infrastructure/go-reflect-utils@v0.0.0-20221130143747-965ef2eb09c3/indirect.go (about)

     1  package reflect_utils
     2  
     3  //func Indirect() bool {
     4  //	return false
     5  //}
     6  
     7  //// Direct 如果是指针类型的,一直不断访问直到拿到非指针类型
     8  //func Direct(t reflect.Type) reflect.Type {
     9  //
    10  //}
    11  
    12  //func VisitIndirect(value reflect.ItemValue) reflect.ItemValue {
    13  //	if value.Kind() == reflect.Ptr || value.Kind() == reflect.Interface {
    14  //		return VisitIndirect(value.Elem())
    15  //	} else {
    16  //		return value
    17  //	}
    18  //}