gitee.com/quant1x/gox@v1.21.2/api/reflect_test.go (about)

     1  package api
     2  
     3  import (
     4  	"fmt"
     5  	"testing"
     6  )
     7  
     8  func TestGetConcreteReflectValueAndType(t *testing.T) {
     9  	type TT struct {
    10  		A int
    11  		B string
    12  	}
    13  
    14  	var list []TT
    15  
    16  	a, b := GetConcreteReflectValueAndType(&list)
    17  	fmt.Println(a, b)
    18  	isPointer, bt := GetConcreteContainerInnerType(b)
    19  	fmt.Println(isPointer, bt)
    20  }