Lines Matching refs:v
55 v := reflect.ValueOf(ps)
56 if v.Kind() != reflect.Ptr || v.Elem().Kind() != reflect.Struct {
57 panic(fmt.Errorf("type %s is not a pointer to a struct", v.Type()))
59 if v.IsNil() {
62 v = v.Elem()
69 sv := fieldByIndex(v, i)
87 v.Type().FieldByIndex(i).Name, v.Type(), sv.Type()))
96 func fieldByIndex(v reflect.Value, index []int) reflect.Value {
98 return v.Field(index[0])
101 if v.Kind() == reflect.Ptr {
102 if v.IsNil() {
105 v = v.Elem()
107 v = v.Field(x)
109 return v