fix write generic helper
This commit is contained in:
parent
03c024c1a8
commit
11e46da3ce
4
meta.go
4
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 {
|
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
|
return err
|
||||||
}
|
}
|
||||||
if err := w.WriteUint32(s.ClassId(), classField); err != nil {
|
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 {
|
if err := s.WriteFields(w); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
return w.EndCollection()
|
return w.EndContainer()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue