func encodeEntry(value string) []byte { switch *coding { case "text": return []byte(value) case "mspack": var v interface{} err := json.Unmarshal([]byte(value), &v) if err != nil { log.Println(err) } b, err := msgpack.Marshal(v) if err != nil { log.Println(err) } return b } return nil }
func (MsgPackSerializer) Encode(data interface{}) ([]byte, error) { return msgpack.Marshal(data) }
func fnVMsgpackEncodeFn(ts interface{}) ([]byte, error) { return vmsgpack.Marshal(ts) }
func (c msgpackCodec) Encode(v interface{}) ([]byte, error) { return msgpack.Marshal(v) }
func (m VmihailencoMsgpackSerializer) Marshal(o interface{}) []byte { d, _ := vmihailenco.Marshal(o) return d }