Skip to content

mehrdadrad/goasn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Go Report Card

Resolve ASN to description

It works based on the bgp.potaroo.net and resolves the AS number to description. It creates a database at your local host and doesn't touch the website for the future resolve's requests. it's fast and safe for goroutine.

Installation

 go get github.com/mehrdadrad/goasn

Usage

  package main

  import (
      "github.com/mehrdadrad/goasn"
  )

  func main() {
      asn := goasn.NewASN()
      asn.Init()

      if a, err := asn.Get(15133); err == nil {
        println(a.Descr)
      }
  }
>go run main.go
>EDGECAST - MCI Communications Services, Inc. d/b/a Verizon Business, US

License

This project is licensed under MIT license. Please read the LICENSE file.

Contribute

Welcomes any kind of contribution, please follow the next steps:

  • Fork the project on github.com.
  • Create a new branch.
  • Commit changes to the new branch.
  • Send a pull request.

About

Go library for resolving ASN to description

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages