Lines Matching refs:reflect
72 di = getDiscardInfo(reflect.TypeOf(m).Elem())
79 typ reflect.Type
94 discardInfoMap = map[reflect.Type]*discardInfo{}
98 func getDiscardInfo(t reflect.Type) *discardInfo {
160 if tf.Kind() == reflect.Slice && tf.Elem().Kind() != reflect.Uint8 {
164 if tf.Kind() == reflect.Ptr {
168 if isPointer && isSlice && tf.Kind() != reflect.Struct {
173 case reflect.Struct:
196 case reflect.Map:
201 if tf.Elem().Kind() == reflect.Ptr { // Proto struct (e.g., *T)
216 case reflect.Interface:
227 if sv.Kind() == reflect.Ptr && sv.IsNil() {
231 case reflect.Ptr: // Proto struct (e.g., *T)
245 if f.Type != reflect.TypeOf([]byte{}) {
255 v := reflect.ValueOf(m)
256 if v.Kind() != reflect.Ptr || v.IsNil() {
260 if v.Kind() != reflect.Struct {
275 if tf.Kind() == reflect.Slice && tf.Elem().Kind() != reflect.Uint8 {
279 if tf.Kind() == reflect.Ptr {
283 if isPointer && isSlice && tf.Kind() != reflect.Struct {
288 case reflect.Struct:
299 case reflect.Map:
305 if tv.Kind() == reflect.Ptr && tv.Implements(protoMessageType) { // Proto struct (e.g., *T)
312 case reflect.Interface:
323 if vf.Kind() == reflect.Ptr {
333 if vf.Type() != reflect.TypeOf([]byte{}) {
336 vf.Set(reflect.ValueOf([]byte(nil)))