code: func (enc *Encoder) Encode(pb proto.Message) error {
  	buf, err := proto.Marshal(pb)
  	if err != nil {
  		return err
  	}
  
  	if _, err := enc.w.Write(buf); err != nil {
  		return err
  	}
  
  	return nil
  }
docs: // Encode marshals m into bytes and writes them to r.