From e5346f7e4feb360594aaa0194673493accfc97b0 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Mon, 23 Dec 2024 18:38:01 +0300 Subject: [PATCH] codec: add yaml support Signed-off-by: Vasiliy Tolstov --- codec/frame.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/codec/frame.go b/codec/frame.go index 133e690c..9b7e064a 100644 --- a/codec/frame.go +++ b/codec/frame.go @@ -20,6 +20,16 @@ func (m *Frame) UnmarshalJSON(data []byte) error { return m.Unmarshal(data) } +// MarshalYAML returns frame data +func (m *Frame) MarshalYAML() ([]byte, error) { + return m.Marshal() +} + +// UnmarshalYAML set frame data +func (m *Frame) UnmarshalYAML(data []byte) error { + return m.Unmarshal(data) +} + // ProtoMessage noop func func (m *Frame) ProtoMessage() {}