elem *runtime.Type
}
+// arrayOrSliceType is an unexported method that guarantees only
+// arrays and slices implement ArrayOrSliceType.
+func (*SliceType) arrayOrSliceType() {}
+
// Struct field
type structField struct {
name *string
// Elem returns the type of the array's elements.
func (t *ArrayType) Elem() Type { return toType(*t.elem) }
+// arrayOrSliceType is an unexported method that guarantees only
+// arrays and slices implement ArrayOrSliceType.
+func (*ArrayType) arrayOrSliceType() {}
+
// Dir returns the channel direction.
func (t *ChanType) Dir() ChanDir { return ChanDir(t.dir) }
type ArrayOrSliceType interface {
Type
Elem() Type
+ arrayOrSliceType() // Guarantees only Array and Slice implement this interface.
}
// Typeof returns the reflection Type of the value in the interface{}.