MCPcopy
hub / github.com/golang/protobuf / fakeMarshaler

Struct fakeMarshaler

proto/proto_test.go:209–212  ·  proto/proto_test.go::fakeMarshaler

fakeMarshaler is a simple struct implementing Marshaler and Message interfaces.

Source from the content-addressed store, hash-verified

207
208// fakeMarshaler is a simple struct implementing Marshaler and Message interfaces.
209type fakeMarshaler struct {
210 b []byte
211 err error
212}
213
214func (f *fakeMarshaler) Marshal() ([]byte, error) { return f.b, f.err }
215func (f *fakeMarshaler) String() string { return fmt.Sprintf("Bytes: %v Error: %v", f.b, f.err) }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected