goref/builder_test.go

18 lines
241 B
Go
Raw Normal View History

2023-06-22 14:29:11 +00:00
package goref_test
import (
"gitter.top/common/goref"
"reflect"
"testing"
)
func TestBuildSliceStruct(t *testing.T) {
type T struct {
A string
}
var a T
at := reflect.TypeOf(a)
value := goref.BuildSlice(at)
t.Log(value.([]T))
}