fix(system): Use os.Hostname

This commit is contained in:
Brian Waldon 2014-03-18 11:04:33 -07:00
parent 9818565c7d
commit dcd82e6c50

View File

@ -168,10 +168,7 @@ func SetHostname(hostname string) error {
}
func Hostname() (string, error) {
cmd := exec.Command("hostname")
output, err := cmd.CombinedOutput()
hostname := strings.TrimSpace(string(output))
return hostname, err
return os.Hostname()
}
func MachineID(root string) string {