MCPcopy
hub / github.com/protocolbuffers/protobuf-go / Reset

Method Reset

internal/impl/legacy_message.go:496–504  ·  view source on GitHub ↗

Reset implements the v1 proto.Message.Reset method.

()

Source from the content-addressed store, hash-verified

494
495// Reset implements the v1 proto.Message.Reset method.
496func (m aberrantMessage) Reset() {
497 if mr, ok := m.v.Interface().(interface{ Reset() }); ok {
498 mr.Reset()
499 return
500 }
501 if m.v.Kind() == reflect.Ptr && !m.v.IsNil() {
502 m.v.Elem().Set(reflect.Zero(m.v.Type().Elem()))
503 }
504}
505
506func (m aberrantMessage) ProtoReflect() protoreflect.Message {
507 return m

Callers

nothing calls this directly

Calls 8

IsNilMethod · 0.80
ElemMethod · 0.80
InterfaceMethod · 0.65
ResetMethod · 0.65
KindMethod · 0.65
SetMethod · 0.65
ZeroMethod · 0.65
TypeMethod · 0.65

Tested by

no test coverage detected