refactor: make InitMarshaller signature consistent with InitUnmarshaller
This commit is contained in:
parent
2bf906d31c
commit
fd786ac3c1
|
@ -33,7 +33,7 @@ func NewDirectoryMetadata(details DirectoryMetadataDetails, directories director
|
|||
return dirMetadata
|
||||
}
|
||||
func (dm *DirectoryMetadata) EncodeMsgpack(enc *msgpack.Encoder) error {
|
||||
err := serialize.InitMarshaller(types.MetadataTypeDirectory, enc)
|
||||
err := serialize.InitMarshaller(enc, types.MetadataTypeDirectory)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ func NewEmptyWebAppMetadata() *WebAppMetadata {
|
|||
}
|
||||
|
||||
func (wm *WebAppMetadata) EncodeMsgpack(enc *msgpack.Encoder) error {
|
||||
err := serialize.InitMarshaller(types.MetadataTypeWebApp, enc)
|
||||
err := serialize.InitMarshaller(enc, types.MetadataTypeWebApp)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"slices"
|
||||
)
|
||||
|
||||
func InitMarshaller(kind types.MetadataType, enc *msgpack.Encoder) error {
|
||||
func InitMarshaller(enc *msgpack.Encoder, kind types.MetadataType) error {
|
||||
err := enc.EncodeInt(types.MetadataMagicByte)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
Loading…
Reference in New Issue