Skip to content
Snippets Groups Projects
Commit af2abc6c authored by Matt Keeler's avatar Matt Keeler
Browse files

Don’t encode the nil entry at all

parent d965aaab
No related merge requests found
......@@ -479,17 +479,19 @@ func (c *ConfigEntryResponse) MarshalBinary() (data []byte, err error) {
bs := make([]byte, 128)
enc := codec.NewEncoderBytes(&bs, msgpackHandle)
kind := ""
if c.Entry != nil {
kind = c.Entry.GetKind()
if err := enc.Encode(c.Entry.GetKind()); err != nil {
return nil, err
}
if err := enc.Encode(c.Entry); err != nil {
return nil, err
}
} else {
if err := enc.Encode(""); err != nil {
return nil, err
}
}
if err := enc.Encode(kind); err != nil {
return nil, err
}
if err := enc.Encode(c.Entry); err != nil {
return nil, err
}
if err := enc.Encode(c.QueryMeta); err != nil {
return nil, err
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment