func (g GUID) ToWindowsArray() [16]byte {
	return g.toArray(binary.LittleEndian)
}
ToWindowsArray returns an array of 16 bytes representing the GUID in Windows
encoding.
package guid
import (
	"crypto/rand"
	"crypto/sha1"
	"encoding"
	"encoding/binary"
	"fmt"
	"strconv"
	"golang.org/x/sys/windows"
)
type Variant uint8
const (
	VariantUnknown Variant = iota
	VariantNCS
	VariantRFC4122
	VariantMicrosoft
	VariantFuture
)
type Version uint8
var _ = (encoding.TextMarshaler)(GUID{})
var _ = (encoding.TextUnmarshaler)(&GUID{})
type GUID windows.GUID
func NewV4() (GUID, error) {
	var b [16]byte
	if _, err := rand.Read(b[:]); err != nil {
		return GUID{}, err
	}
	g := FromArray(b)
	g.setVersion(4)  
	g.setVariant(VariantRFC4122)
	return g, nil
}
func NewV5(namespace GUID, name []byte) (GUID, error) {
	b := sha1.New()
	namespaceBytes := namespace.ToArray()
	b.Write(namespaceBytes[:])
	b.Write(name)
	a := [16]byte{}
	copy(a[:], b.Sum(nil))
	g := FromArray(a)
	g.setVersion(5)  
	g.setVariant(VariantRFC4122)
	return g, nil
}
func fromArray(b [16]byte, order binary.ByteOrder) GUID {
	var g GUID
	g.Data1 = order.Uint32(b[0:4])
	g.Data2 = order.Uint16(b[4:6])
	g.Data3 = order.Uint16(b[6:8])
	copy(g.Data4[:], b[8:16])
	return g
}
func (g GUID) toArray(order binary.ByteOrder) [16]byte {
	b := [16]byte{}
	order.PutUint32(b[0:4], g.Data1)
	order.PutUint16(b[4:6], g.Data2)
	order.PutUint16(b[6:8], g.Data3)
	copy(b[8:16], g.Data4[:])
	return b
}
func FromArray(b [16]byte) GUID {
	return fromArray(b, binary.BigEndian)
}
func (g GUID) ToArray() [16]byte {
	return g.toArray(binary.BigEndian)
}
func FromWindowsArray(b [16]byte) GUID {
	return fromArray(b, binary.LittleEndian)
}