Skip to content

twiny/whois

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WHOIS Client

a simple Go WHOIS Client API. It supports custom proxy.Dialer for Socks5.

API

Query(ctx context.Context, domain string) (Response, error)

Install

go get github.com/twiny/whois/v2

Example

package main

import (
 "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