Skip to content

Andals/go-ipquery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ipquery

ip query library for golang

Usage

package main

import (
    "fmt"

    "github.com/andals/go-ipquery"
)

func main() {
  	df := "testdata/test_10000.data"
  	err := ipquery.Load(df)
  	if err != nil {
  		fmt.Println(err)
  	}
    
  	ip := "61.149.208.1"
  	dt, err := ipquery.Find(ip)
  
  	if err != nil {
  		fmt.Println(err)
  	} else {
  		fmt.Println(ip, string(dt))
  	}
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages