Skip to content

twiny/domaincheck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

domaincheck

A domain name availability checker, using whois client and regexp.

Install

go get github.com/twiny/domaincheck

API

NewChecker() (*Checker, error)
Check(ctx context.Context, domain string) (DomainStatus, error)

Example

package main

import (
    "context"
    "fmt"
    "log"

    "github.com/twiny/domaincheck"
)

func main() {
    checker, err := domaincheck.NewChecker()
    if err != nil {
        log.Fatal(err)
    }

    status, err := checker.Check(context.Background(), "example.com")
    if err != nil {
        log.Fatal(err)
    }

    fmt.Println(status)
}

Bugs

Bugs or suggestions? Please visit the issue tracker.