Registry /
networking / lionsoul2014-ip2region-binding-golang
Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
ip2region
✓ github.com/lionsoul2014/ip2region/binding/golang
Look up the geographic location of an IP address.
package main
import (
"fmt"
"github.com/lionsoul2014/ip2region/binding/golang"
)
func main() {
region, err := ip2region.New("./ip2region.db")
if err != nil {
panic(err)
}
defer region.Close()
loc, err := region.MemorySearch("8.8.8.8")
if err != nil {
panic(err)
}
fmt.Println(loc)
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
Breaking-change detection hasn't run for this library yet.
Audit
Dependencies
No dependency data recorded yet.