18 lines
238 B
Go
18 lines
238 B
Go
|
// +build linux freebsd
|
||
|
|
||
|
package main
|
||
|
|
||
|
import (
|
||
|
"os"
|
||
|
"syscall"
|
||
|
)
|
||
|
|
||
|
func (h Host) HostInfo() (HostInfo, error) {
|
||
|
ret := HostInfo{}
|
||
|
hostname, err := os.Hostname()
|
||
|
ret.Hostname = hostname
|
||
|
ret.Uptime = sysinfo.Uptime
|
||
|
|
||
|
return ret, nil
|
||
|
}
|