MCPcopy Create free account
hub / github.com/OpenPrinting/goipp / EncodeBytes

Method EncodeBytes

message.go:222–227  ·  view source on GitHub ↗

EncodeBytes encodes message to byte slice

()

Source from the content-addressed store, hash-verified

220
221// EncodeBytes encodes message to byte slice
222func (m *Message) EncodeBytes() ([]byte, error) {
223 var buf bytes.Buffer
224
225 err := m.Encode(&buf)
226 return buf.Bytes(), err
227}
228
229// Decode reads message from io.Reader
230func (m *Message) Decode(in io.Reader) error {

Callers 5

testDecodeFunction · 0.95
TestEncodeDecodeFunction · 0.80
TestEncodeErrorsFunction · 0.80
TestDecodeErrorsFunction · 0.80
TestTagExtensionFunction · 0.80

Calls 2

EncodeMethod · 0.95
BytesMethod · 0.80

Tested by 5

testDecodeFunction · 0.76
TestEncodeDecodeFunction · 0.64
TestEncodeErrorsFunction · 0.64
TestDecodeErrorsFunction · 0.64
TestTagExtensionFunction · 0.64