Documentation
¶
Index ¶
- Variables
- func Lookup(domain string) (string, error)
- func ParseHosts(hostsFileContent []byte, err error) (map[string][]string, error)
- func ParseHostsToDomainIPMap(hostsFileContent []byte, err error) (map[string]string, error)
- func ReadHostsFile() ([]byte, error)
- func ReverseLookup(ip string) ([]string, error)
Constants ¶
This section is empty.
Variables ¶
var HostsPath = `/etc/hosts`
Functions ¶
func ParseHosts ¶
ParseHosts takes in hosts file content and returns a map of parsed results.
func ParseHostsToDomainIPMap ¶
ParseHostsToDomainIPMap takes in hosts file content and returns a map of parsed results.
func ReverseLookup ¶
ReverseLookup takes an IP address and returns a slice of matching hosts file entries.
Types ¶
This section is empty.