Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mehrdadrad/goasn
Go library for resolving ASN to description
https://github.com/mehrdadrad/goasn
asn network
Last synced: 2 days ago
JSON representation
Go library for resolving ASN to description
- Host: GitHub
- URL: https://github.com/mehrdadrad/goasn
- Owner: mehrdadrad
- License: mit
- Created: 2017-11-22T06:36:30.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-27T17:37:23.000Z (about 7 years ago)
- Last Synced: 2024-11-11T03:28:34.220Z (2 months ago)
- Topics: asn, network
- Language: Go
- Homepage:
- Size: 19.5 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/mehrdadrad/goasn.svg?branch=master)](https://travis-ci.org/mehrdadrad/goasn)
[![Go Report Card](https://goreportcard.com/badge/github.com/mehrdadrad/goasn)](https://goreportcard.com/report/github.com/mehrdadrad/goasn)
# Resolve ASN to description
It works based on the [bgp.potaroo.net](http://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 mainimport (
"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.