A Go library for interacting with MACLookup's API v2. This library allows you to:
- Get full info (MAC prefix, company name, address and country) of a MAC address
- Get Company name by MAC
You need a working Go environment.
go get github.com/logocomune/maclookup-go
##Getting Started
package main
import (
"log"
"github.com/logocomune/maclookup-go"
)
func main() {
client := maclookup.New()
r, err := client.CompanyName("000000")
if err != nil {
log.Fatal(err)
}
log.Println("MAC found in database:", r.Found)
log.Println("MAC is private (no company name):", r.IsPrivate)
log.Println("Company name:", r.Company)
log.Println("Api response in: ", r.RespTime)
log.Println("Rate limits - remaining request for current time window:", r.RateLimit.Remaining)
log.Println("Rate limits - next reset", r.RateLimit.Reset)
}
client := maclookup.New()
client.WithTimeout(10*time.Second)
Get an API Key here
client := maclookup.New()
client.WithAPIKey("an_api_key")