code: func (enc *Encoder) Encode(v interface{}) (int, error) {
  	if v == nil {
  		msg := "can't marshal nil interface"
  		err := marshalError("Marshal", ErrNilInterface, msg, nil, nil)
  		return 0, err
  	}
  
  	vv := reflect.ValueOf(v)
  	vve := vv
  	for vve.Kind() == reflect.Ptr {
  		if vve.IsNil() {
  			msg := fmt.Sprintf("can't marshal nil pointer '%v'",
  				vv.Type().String())
  			err := marshalError("Marshal", ErrBadArguments, msg,
  				nil, nil)
  			return 0, err
  		}
  		vve = vve.Elem()
  	}
  
  	return enc.encode(vve)
  }
docs: // Encode operates identically to the Marshal function with the exception of
  // using the writer associated with the Encoder for the destination of the
  // XDR-encoded data instead of a user-supplied writer.  See the Marshal
  // documentation for specifics.