18 lines
241 B
Go
18 lines
241 B
Go
|
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))
|
||
|
}
|