func (enc *Encoder) EncodeUhyper(v uint64) (err error) {
	b := make([]byte, 8, 8)
	b[0] = byte(v >> 56)
	b[1] = byte(v >> 48)
	b[2] = byte(v >> 40)
	b[3] = byte(v >> 32)
	b[4] = byte(v >> 24)
	b[5] = byte(v >> 16)
	b[6] = byte(v >> 8)
	b[7] = byte(v)
	if len(enc.data) > maxInt-8 {
		err = marshalError("EncodeUhyper", ErrOverflow, errMaxSlice, b)
		return
	}
	enc.data = append(enc.data, b...)
	return
}
EncodeUhyper appends the XDR encoded representation of the passed 64-bit
unsigned integer to the Encoder's data.

A MarshalError is returned if appending the data would overflow the
internal data slice.

Reference:
RFC Section 4.5 - Unsigned Hyper Integer
64-bit big-endian unsigned integer in range [0, 18446744073709551615]
package xdr
import (
	"fmt"
	"math"
	"reflect"
	"time"
)
var errMaxXdr = "data exceeds max xdr size limit"
func Marshal(v interface{}) (rv []byte, err error) {
	if v == nil {
		msg := "can't marshal nil interface"
		err = marshalError("Marshal", ErrNilInterface, msg, nil)
		return nil, 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)
			return nil, err
		}
		vve = vve.Elem()
	}
	enc := Encoder{}
	err = enc.encode(vve)
	return enc.data, err
}
type Encoder struct {
	data []byte
	off  int
}
func (enc *Encoder) EncodeInt(v int32) (err error) {
	b := make([]byte, 4, 4)
	b[0] = byte(v >> 24)
	b[1] = byte(v >> 16)
	b[2] = byte(v >> 8)
	b[3] = byte(v)
	if len(enc.data) > maxInt-4 {
		err = marshalError("EncodeInt", ErrOverflow, errMaxSlice, b)
		return
	}
	enc.data = append(enc.data, b...)
	return
}
func (enc *Encoder) EncodeUint(v uint32) (err error) {
	b := make([]byte, 4, 4)
	b[0] = byte(v >> 24)
	b[1] = byte(v >> 16)
	b[2] = byte(v >> 8)
	b[3] = byte(v)
	if len(enc.data) > maxInt-4 {
		err = marshalError("EncodeUint", ErrOverflow, errMaxSlice, b)
		return
	}
	enc.data = append(enc.data, b...)
	return
}
func (enc *Encoder) EncodeEnum(v int32, validEnums map[int32]bool) (err error) {
	if !validEnums[v] {
		err = marshalError("EncodeEnum", ErrBadEnumValue, "invalid enum", v)
		return
	}
	return enc.EncodeInt(v)
}
func (enc *Encoder) EncodeBool(v bool) (err error) {
	i := int32(0)
	if v == true {
		i = 1
	}
	return enc.EncodeInt(i)
}
func (enc *Encoder) EncodeHyper(v int64) (err error) {
	b := make([]byte, 8, 8)
	b[0] = byte(v >> 56)
	b[1] = byte(v >> 48)
	b[2] = byte(v >> 40)
	b[3] = byte(v >> 32)
	b[4] = byte(v >> 24)
	b[5] = byte(v >> 16)
	b[6] = byte(v >> 8)
	b[7] = byte(v)
	if len(enc.data) > maxInt-8 {
		err = marshalError("EncodeHyper", ErrOverflow, errMaxSlice, b)
		return
	}
	enc.data = append(enc.data, b...)
	return
}