available

package module
v0.0.0-...-5940a16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2024 License: GPL-3.0 Imports: 4 Imported by: 31

README

Is 'domain.x' Available?

Build Status Go Report Card GoDoc GitHub license

IN WHOIS WE TRUST

My cheap way of checking whether a domain is available to be purchased or not (powered by whois).

Disclaimer

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.).

Example
package main

import (
        "fmt"
        "github.com/haccer/available"
)

func main() {
        domain := "dreamdomain.io"

        available := available.Domain(domain)

        if available {
                fmt.Println("[+] Success!")
        }
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Domain

func Domain(domain string) (available bool)
Domain returns if the domain is available or not.

This function does not have a triage step, and will result in testing each TLD with one of the default responses.

func SafeDomain

func SafeDomain(domain string) (available, badtld bool)
SafeDomain utilizes the badtld checklist as a triage step,

then returns whether the domain is available and/or if the domain has a "bad" tld.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL