Whois
Whois client for Go.
Install / Use
/learn @domainr/WhoisREADME
Whois
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
node-connect
352.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
352.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
352.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
