Golang wrapper for ip-api.com service
Install the package with:
go get github.com/oashnic/ip-api-wrapperImport it with:
import "github.com/oashnic/ip-api-wrapper"and use ipapi as the package name inside the code.
package main
import (
"fmt"
"gitlab.com/oashnic/ip-api-wrapper"
)
func main() {
geo, err := GetLocation("8.8.8.8", LOCAL_ENGLISH)
if err != nil {
panic(err)
}
fmt.Println("AS: " + geo.AS)
}