func (m *Map) Close() error {
	if m.fd == nil {
		return errUninitializedMap
	}
	return m.fd.Close()
}
Close destroys the map and releases the associated file descriptor. After a call
to Close, future method calls on the Map will return errors.
package ebpf
import (
	"errors"
	"fmt"
	"unsafe"
	"golang.org/x/sys/unix"
)
type MapType uint32
const (
	MapUnspec MapType = iota
	MapHash
	MapArray
	MapProgArray
	MapPerfEventArray
	MapPerCPUHash
	MapPerCPUArray
	MapStackTrace
	MapCGroupArray
	MapLRUHash
	MapLRUPerCPUHash
	MapLPMTrie
	MapArrayOfMaps
	MapHashOfMaps
	MapDevmap
	MapSockmap
	MapCPUmap
	MapXSKMap
	MapSockhash
	MapCGroupStorage
	MapReuseportSockarray
	maxMapType  
)
type Map struct {
	Type           MapType
	KeySize        uint32
	ValueSize      uint32
	MaxEntries     uint32
	Flags          uint32  
	InnerMap       *Map    
	NUMANode       uint32
	ObjectName     string
	InterfaceIndex uint32  
	fd *mapFD
}
func (m *Map) Init() error {
	if m.Type == MapUnspec {
		return errors.New("ebpf: unspecified map type")
	}
	if m.Type >= maxMapType {
		return fmt.Errorf("ebpf: invalid map type %d", m.Type)
	}
	if m.KeySize == 0 {
		return errors.New("ebpf: map KeySize not configured")
	}
	if m.MaxEntries == 0 {
		return errors.New("ebpf: map MaxEntries not configured")
	}
	cfg := mapAttr{
		Type:           m.Type,
		KeySize:        m.KeySize,
		ValueSize:      m.ValueSize,
		MaxEntries:     m.MaxEntries,
		Flags:          m.Flags,
		InnerMapFD:     0,  
		NUMANode:       m.NUMANode,
		Name:           newObjectName(m.ObjectName),
		InterfaceIndex: m.InterfaceIndex,
	}
	fd := new(mapFD)
	if err := fd.Init(&cfg); err != nil {
		return wrapMapOpError("init", err)
	}
	m.fd = fd
	return nil
}
var errUninitializedMap = errors.New("ebpf: use of uninitialized map")
func (m *Map) Lookup(k, v []byte) error {
	if m.fd == nil {
		return errUninitializedMap
	}
	return wrapMapOpError("lookup", m.fd.Lookup(k, v))
}
func (m *Map) Set(k, v []byte) error {
	if m.fd == nil {
		return errUninitializedMap
	}
	return wrapMapOpError("set", m.fd.Update(k, v, mapUpdateAny))
}
func (m *Map) Create(k, v []byte) error {
	if m.fd == nil {
		return errUninitializedMap
	}
	return wrapMapOpError("create", m.fd.Update(k, v, mapUpdateNoexist))
}
func (m *Map) Update(k, v []byte) error {
	if m.fd == nil {
		return errUninitializedMap
	}
	return wrapMapOpError("update", m.fd.Update(k, v, mapUpdateExist))
}
func (m *Map) DeleteElem(k []byte) error {
	if m.fd == nil {
		return errUninitializedMap
	}
	return wrapMapOpError("delete", m.fd.DeleteElem(k))
}
type MapIterFunc func(key, value []byte) (stop bool)
func (m *Map) Iter(fn MapIterFunc, startHint []byte) error {
	if m.fd == nil {
		return errUninitializedMap
	}
	return wrapMapOpError("iter", m.fd.Iter(fn, startHint))
}