fix(system): Use os.Hostname
This commit is contained in:
parent
9818565c7d
commit
dcd82e6c50
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user