Stub out reflect.Type FieldByIndex

This commit is contained in:
Anuraag Agrawal
2022-10-24 15:30:14 +09:00
committed by Ron Evans
parent 3dbc4d5210
commit 62594004c6
+5 -1
View File
@@ -295,7 +295,7 @@ type Type interface {
// to the index sequence. It is equivalent to calling Field
// successively for each index i.
// It panics if the type's Kind is not Struct.
//FieldByIndex(index []int) StructField
FieldByIndex(index []int) StructField
// FieldByName returns the struct field with the given name
// and a boolean indicating if the field was found.
@@ -761,6 +761,10 @@ func (t rawType) FieldByName(name string) (StructField, bool) {
panic("unimplemented: (reflect.Type).FieldByName()")
}
func (t rawType) FieldByIndex(index []int) StructField {
panic("unimplemented: (reflect.Type).FieldByIndex()")
}
// A StructField describes a single field in a struct.
type StructField struct {
// Name indicates the field name.