func readHeader(reader io.Reader, sectorSize uint64) (res Header, err error) {
	read := func(data interface{}) {
		if err == nil {
			err = binary.Read(reader, binary.LittleEndian, data)
		}
	}
	read(&res.Signature)
	read(&res.Revision)
	read(&res.Size)
	read(&res.CRC)
	read(&res.Reserved)
	read(&res.HeaderStartLBA)
	read(&res.HeaderCopyStartLBA)
	read(&res.FirstUsableLBA)
	read(&res.LastUsableLBA)
	read(&res.DiskGUID)
	read(&res.PartitionsTableStartLBA)
	read(&res.PartitionsArrLen)
	read(&res.PartitionEntrySize)
	read(&res.PartitionsCRC)
	if err != nil {
		return
	}
	if string(res.Signature[:]) != "EFI PART" {
		return res, fmt.Errorf("Bad GPT signature")
	}
	trailingBytes := make([]byte, sectorSize-uint64(standardHeaderSize))
	reader.Read(trailingBytes)
	res.TrailingBytes = trailingBytes
	if res.calcCRC() != res.CRC {
		return res, fmt.Errorf("BAD GPT Header CRC")
	}
	return
}
////////////////////////////////////////////
//////////////// HEADER ////////////////////
////////////////////////////////////////////
Have to set to start of Header. Usually LBA1 for primary header.
package gpt
import (
	"bytes"
	"encoding/binary"
	"fmt"
	"hash/crc32"
	"io"
	"unicode/utf16"
)
const standardHeaderSize = 92           
const standardPartitionEntrySize = 128  
type Flags [8]byte
type Guid [16]byte
func (this Guid) String() string {
	return guidToString(this)
}
type PartType Guid
func (this PartType) String() string {
	return guidToString(this)
}
var (
	GUID_LVM = PartType([16]byte{0x79, 0xd3, 0xd6, 0xe6, 0x7, 0xf5, 0xc2, 0x44, 0xa2, 0x3c, 0x23, 0x8f, 0x2a, 0x3d, 0xf9, 0x28})  
)
type Header struct {
	Signature               [8]byte  
	Revision                uint32   
	Size                    uint32   
	CRC                     uint32   
	Reserved                uint32   
	HeaderStartLBA          uint64   
	HeaderCopyStartLBA      uint64   
	FirstUsableLBA          uint64   
	LastUsableLBA           uint64   
	DiskGUID                Guid     
	PartitionsTableStartLBA uint64   
	PartitionsArrLen        uint32   
	PartitionEntrySize      uint32   
	PartitionsCRC           uint32   
	TrailingBytes           []byte   
}
type Partition struct {
	Type          PartType  
	Id            Guid      
	FirstLBA      uint64    
	LastLBA       uint64    
	Flags         Flags     
	PartNameUTF16 [72]byte  
	TrailingBytes []byte    
}
type Table struct {
	SectorSize uint64  
	Header     Header
	Partitions []Partition
}