From dcd82e6c508f44ed58f54e0fb139e75c0f60233e Mon Sep 17 00:00:00 2001 From: Brian Waldon Date: Tue, 18 Mar 2014 11:04:33 -0700 Subject: [PATCH] fix(system): Use os.Hostname --- system/systemd.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/system/systemd.go b/system/systemd.go index 152002a..a2605ee 100644 --- a/system/systemd.go +++ b/system/systemd.go @@ -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 {