| 462 | func (x *dynamicMap) Has(k protoreflect.MapKey) bool { return x.Get(k).IsValid() } |
| 463 | func (x *dynamicMap) Clear(k protoreflect.MapKey) { delete(x.mapv, k.Interface()) } |
| 464 | func (x *dynamicMap) Mutable(k protoreflect.MapKey) protoreflect.Value { |
| 465 | if x.desc.MapValue().Message() == nil { |
| 466 | panic(errors.New("%v: invalid Mutable on map with non-message value type", x.desc.FullName())) |
| 467 | } |
| 468 | v := x.Get(k) |
| 469 | if !v.IsValid() { |
| 470 | v = x.NewValue() |
| 471 | x.Set(k, v) |
| 472 | } |
| 473 | return v |
| 474 | } |
| 475 | func (x *dynamicMap) Len() int { return len(x.mapv) } |
| 476 | func (x *dynamicMap) NewValue() protoreflect.Value { |
| 477 | if md := x.desc.MapValue().Message(); md != nil { |