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() }