func (e MEPartitionEntry) Type() string {
	t := byte(e.Flags & 0x7f)
	if s, ok := mePartitionEntryTypeNames[t]; ok {
		return s
	}
	return fmt.Sprintf("Unknown (%d)", t)
}
Type returns the type of the entry
package uefi
import (
	"bytes"
	"encoding/binary"
	"encoding/hex"
	"fmt"
	"github.com/linuxboot/fiano/pkg/log"
)
var (
	MEFTPSignature = []byte{0x24, 0x46, 0x50, 0x54}
)
const (
	MEPartitionDescriptorMinLength = 28
	MEPartitionTableEntryLength = 32
)
type MEFPT struct {
	buf []byte
	PartitionCount    uint32
	PartitionMapStart int
	Entries           []MEPartitionEntry
	ExtractPath string
}
type MEPartitionEntry struct {
	Name     MEName
	Owner    [4]byte
	Offset   uint32
	Length   uint32
	Reserved [3]uint32
	Flags    uint32
}
type MEName [4]byte
func (n MEName) MarshalText() ([]byte, error) {
	return bytes.TrimRight(n[:], "\x00"), nil
}
func (n *MEName) UnmarshalText(b []byte) error {
	var m MEName
	copy(m[:], b)
	*n = m
	if len(b) > len(m) {
		return fmt.Errorf("can’t unmarshal %q to MEName, %d > %d", b, len(b), len(m))
	}
	return nil
}
func (n MEName) String() string {
	b, _ := n.MarshalText()
	return string(b)
}
func (e MEPartitionEntry) OffsetIsValid() bool {
	return e.Offset != 0 && e.Offset != 0xffffffff
}
var mePartitionEntryTypeNames = map[byte]string{0: "Code", 1: "Data", 2: "NVRAM", 3: "Generic", 4: "EFFS", 5: "ROM"}