https://github.com/twiny/whois
domain name WHOIS client.
https://github.com/twiny/whois
golang whois-client whois-lookup
Last synced: 2 months ago
JSON representation
domain name WHOIS client.
- Host: GitHub
- URL: https://github.com/twiny/whois
- Owner: twiny
- License: mit
- Created: 2021-09-17T00:44:03.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-02-11T16:19:14.000Z (over 1 year ago)
- Last Synced: 2024-06-20T17:04:18.542Z (over 1 year ago)
- Topics: golang, whois-client, whois-lookup
- Language: Go
- Homepage:
- Size: 18.6 KB
- Stars: 4
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WHOIS Client
a simple Go WHOIS Client API. It supports custom `proxy.Dialer` for Socks5.
## API
```go
Query(ctx context.Context, domain string) (Response, error)
```## Install
`go get github.com/twiny/whois/v2`
## Example
```go
package mainimport (
"context"
"fmt""github.com/twiny/whois/v2"
)func main() {
client, err := whois.NewClient(nil)
if err != nil {
fmt.Printf("err: %s\n", err)
}resp, err := client.Query(context.TODO(), "google.com")
if err != nil {
fmt.Printf("err: %s\n", err)
}// Print the response
fmt.Printf("Domain: %+v\n", resp)
}
```## Tracking
- If you wish to add more WHOIS Server please [create a PR](https://github.com/twiny/whois/pulls).
- If you find any issues please [create a new issue](https://github.com/twiny/whois/issues/new).