From c10ff123cd90bf13ba737ec5ecb632accbffc7fa Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 15 Nov 2024 20:59:55 -0600 Subject: sending a machine protobuf --- helpers.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'helpers.go') diff --git a/helpers.go b/helpers.go index 618bec1..6bbb1f7 100644 --- a/helpers.go +++ b/helpers.go @@ -42,3 +42,12 @@ func (p *Packages) Unmarshal(data []byte) error { return proto.Unmarshal(data, p) } +// marshal to wire +func (m *Machine) Marshal() ([]byte, error) { + return proto.Marshal(m) +} + +// unmarshal from wire +func (m *Machine) Unmarshal(data []byte) error { + return proto.Unmarshal(data, m) +} -- cgit v1.2.3