Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ChangeResult ¶
ChangeResult result of changing the hosts file.
func AddHosts ¶
func AddHosts(ip string, toAdd []string, tryWrite bool) ChangeResult
AddHosts attempts to add requested hosts to the system hosts file, and gives you the new content, a tmp file and success.
func RemoveHostsWithSuffix ¶
func RemoveHostsWithSuffix(ip string, hostSuffix string, tryWrite bool) ChangeResult
RemoveHostsWithSuffix attempts to remove all hosts with a suffix from the system hosts file, and gives you the new content, a tmp file and success.
Click to show internal directories.
Click to hide internal directories.