Skip to content

xjh22222228/mac

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MAC

Get the local mac address.

Install

$ go get -u github.com/xjh22222228/mac

Usage

// Fetch the computer's MAC address
macAddr, err := mac.Default()

// Fetch the computer's MAC address for a specific interface
macAddr, err := mac.AddrWithIface("en0")

// Validate that an address is a MAC address
isMac := mac.IsIsMAC("ac:de:48:00:11:22")

LICENSE

MIT