// Encode writes the given Protobuf-encoded message m to its io.Writer. If m
// isn't a proto.Message, Encode will panic.
Encode writes the given Protobuf-encoded message m to its io.Writer. If m
isn't a proto.Message, Encode will panic.
// Encode writes the given Protobuf - encoded message m to its io . Writer . If m // isn ' t a proto . Message Encode will panic .
func (e *Encoder) Encode(m interface{}) error {
	bs, err := proto.Marshal(m.(proto.Message))
	if err != nil {
		return err
	}
	_, err = e.w.Write(bs)
	return err
}
func ( e * Encoder ) Encode ( m interface { } ) error { bs , err := proto . Marshal ( m . ( proto . Message ) ) if err != nil { return err } _ , err = e . w . Write ( bs ) return err }
Encode writes the given Protobuf-encoded message m to its io.Writer.
Encode writes the given Protobuf - encoded message m to its io . Writer .