Files
dnshelper/fileoperations_linux.go
T
2026-03-03 13:58:06 -05:00

19 lines
367 B
Go

//go:build linux
package main
import "errors"
func getHostsFileLocation() (string, error) {
var hostsFileLocation string
hostsFileLocation = "/etc/hosts"
exists, err := fileExists(hostsFileLocation)
if err != nil {
term(err)
}
if exists == false {
term(errors.New("hosts file does not exist at " + hostsFileLocation))
}
return hostsFileLocation, nil
}