SkillAgentSearch skills...

Whois

Whois client for Go.

Install / Use

/learn @domainr/Whois
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Whois

GoDoc

go get github.com/domainr/whois

Whois client for Go (golang), inspired by Ruby Whois. Currently in production use at Domainr.

Design

func whois.Whois(query string) *whois.Record  // Fetches and returns a fully-parsed whois.Record

request = whois.NewRequest(query)             // Returns a prepared whois.Request
response = whois.DefaultClient.Fetch(request) // Fetches the request, returns a whois.Response
record = response.Parse()                     // (not implemented yet) Parses the response, returns a whois.Record

whois.Request  // represents a qualified whois request, including server, URL, and request body
whois.Response // intermediate record, raw response from a whois server for a given query
whois.Record   // parsed whois response; structured data

Logic

query := "domai.nr"
request, err := whois.NewRequest(query)
response, err := whois.DefaultClient.Fetch(request)
record, err := response.Parse() // not implemented yet
if record.Refer != "" {
  response = whois.FetchRefer(record)
}

TODO

  • [X] Create whois.Client
  • [X] Embed an http.Client in whois.Client to reuse state
  • [ ] Implementations for known HTTP-based whois servers
  • [ ] Parsers

Credits

This code is made available under an MIT license. See LICENSE for more information.

© nb.io, LLC

Related Skills

View on GitHub
GitHub Stars414
CategoryDevelopment
Updated2d ago
Forks68

Languages

Go

Security Score

95/100

Audited on Apr 6, 2026

No findings