codec: add yaml support
All checks were successful
lint / lint (pull_request) Successful in 1m31s
coverage / build (pull_request) Successful in 3m10s
test / test (pull_request) Successful in 4m1s

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2024-12-23 18:38:01 +03:00
parent daf19f031a
commit e5346f7e4f

View File

@ -20,6 +20,16 @@ func (m *Frame) UnmarshalJSON(data []byte) error {
return m.Unmarshal(data) 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 // ProtoMessage noop func
func (m *Frame) ProtoMessage() {} func (m *Frame) ProtoMessage() {}