An open API service indexing awesome lists of open source software.

https://github.com/twiny/domaincheck

Domain Name Availability Checker
https://github.com/twiny/domaincheck

domainname golang whois

Last synced: 6 months ago
JSON representation

Domain Name Availability Checker

Awesome Lists containing this project

README

        

## domaincheck

A domain name availability checker, using [whois](https://github.com/twiny/whois) client and regexp.

## Install
`go get github.com/twiny/domaincheck`

## API
```go
NewChecker() (*Checker, error)
Check(ctx context.Context, domain string) (DomainStatus, error)
```

## Example
```go
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](https://github.com/twiny/domaincheck/issues).