Documentation
¶
Index ¶
- Variables
- func Get() (string, error)
- func GetDomainname() (string, string, error)
- func GetWhois(domain, server string) (string, error)
- func Join(hname string, dname string) string
- func ReverseLookupFQDN(hostname string) (string, error)
- func Split(hname string) (string, string, error)
- func SplitOld(s string) (string, string)
- func ValidDomainname(s string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrorDomainNameMisconfigured error = errors.New("your OS domain name is not configured correctly")
View Source
var ErrorEmptyDomainName error = errors.New("domain name is empty")
Functions ¶
func Get ¶
returns the hostname hostname is always set to the best effort error is set if hostname isn't real
func GetDomainname ¶ added in v0.0.4
for www.corp.wit.com retuns: "www", "corp.wit.com", nil
func GetWhois ¶ added in v0.0.4
GetWhois performs a raw whois query for a given domain. Note: This does not recursively find the right server; it uses a known one.
func ReverseLookupFQDN ¶ added in v0.0.2
func Split ¶ added in v0.0.2
splits hostname into first and last part for www.corp.wit.com retuns: "www", "corp.wit.com", nil
func ValidDomainname ¶ added in v0.0.2
checks to make sure there is a domainname
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.