Files
dnshelper/fileoperations_darwin.go
T

19 lines
368 B
Go
Raw Normal View History

2026-03-03 13:58:06 -05:00
//go:build darwin
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
}