package main import ( "bytes" "os" "testing" "time" "github.com/ugorji/go/codec" "github.com/vmihailenco/msgpack" ) type Event struct { Tag string `codec:"tag" msgpack:"tag"` Time time.Time `codec:"time" msgpack:"time"` Record map[string]interface{} } var ( mh = &codec.MsgpackHandle{RawToString: true} event *Event ) func init() { event = &Event{ Tag: "sysstat.process", Time: time.Now(), Record: ma