From 11e46da3ce1ebc87d15a2fb0fdb334aaf0cfab03 Mon Sep 17 00:00:00 2001 From: Pavel Merzlyakov Date: Fri, 1 Sep 2023 17:21:04 +0300 Subject: [PATCH] fix write generic helper --- meta.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta.go b/meta.go index eb344a3..1ff8344 100644 --- a/meta.go +++ b/meta.go @@ -29,7 +29,7 @@ func ReadGeneric(r Reader, createFunc StructFactory, field string) (Readable, er } func WriteGeneric(w Writer, s WritableClass, field string) error { - if err := w.BeginCollection(s.FieldsCount()+1, field); err != nil { + if err := w.BeginContainer(s.FieldsCount()+1, field); err != nil { return err } if err := w.WriteUint32(s.ClassId(), classField); err != nil { @@ -38,5 +38,5 @@ func WriteGeneric(w Writer, s WritableClass, field string) error { if err := s.WriteFields(w); err != nil { return err } - return w.EndCollection() + return w.EndContainer() }