IN WHOIS WE TRUST
My cheap way of checking whether a domain is available to be purchased or not (powered by whois).
This package might not be able to check the available for every possible domain TLD, since whois
does not work with some TLDs. In the future, I might include options to call different APIs (Gandi API, Domainr, etc.).
package main
import (
"fmt"
"github.com/haccer/available"
)
func main() {
domain := "dreamdomain.io"
available := available.Domain(domain)
if available {
fmt.Println("[+] Success!")
}
}