code: func (enc *Encoder) encodeMap(v reflect.Value) (err error) {
  	dataLen := v.Len()
  	if uint(dataLen) > math.MaxUint32 {
  		err = marshalError("encodeMap", ErrOverflow, errMaxXdr, dataLen)
  		return
  	}
  	err = enc.EncodeUint(uint32(dataLen))
  	if err != nil {
  		return
  	}
  
  	// Encode each key and value according to their type.
  	for _, key := range v.MapKeys() {
  		err = enc.encode(key)
  		if err != nil {
  			return
  		}
  
  		err = enc.encode(v.MapIndex(key))
  		if err != nil {
  			return
  		}
  	}
  	return
  }
docs: // RFC Section 4.15 - Discriminated Union
  // RFC Section 4.16 - Void
  // RFC Section 4.17 - Constant
  // RFC Section 4.18 - Typedef
  // RFC Section 4.19 - Optional data
  // RFC Sections 4.15 though 4.19 only apply to the data specification language
  // which is not implemented by this package.  In the case of discriminated
  // unions, struct tags are used to perform a similar function.
  // encodeMap treats the map represented by the passed reflection value as a
  // variable-length array of 2-element structures whose fields are of the same
  // type as the map keys and elements and appends its XDR encoded representation
  // to the Encoder's data.
  //
  // A MarshalError is returned if any issues are encountered while encoding
  // the elements.