Versions in this module Expand all Collapse all v0 v0.0.1 Dec 3, 2024 Changes in this version + func AddEntry(hostsFilePath, ip string, fqdn string) error + func Contains(slice []string, item string) bool + func EnsureHeader(hostsFilePath string) error + func GetEntriesByHostname(hostsFilePath, fqdn string) ([]string, error) + func GetEntriesByIP(hostsFilePath, ip string) ([]string, error) + func RemoveAllHostname(hostsFilePath, fqdn string) error + func RemoveAllIP(hostsFilePath, ip string) error + func RemoveEntry(hostsFilePath, ip string, fqdn string) error + type IPOrHost int + const HOST + const INVALID + const IP + func IsIPorHostEntry(input string) IPOrHost