From 54a6c186c1089e2bfccb84c433099c4d4f47cc5b Mon Sep 17 00:00:00 2001 From: WAKAYAMA shirou Date: Tue, 24 Nov 2015 09:48:05 +0900 Subject: [PATCH] host[freebsd]: BREAKING CHANGE. Boottime() should return uint64 same as other. --- host/host_freebsd.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/host/host_freebsd.go b/host/host_freebsd.go index 69e2197..4a151fd 100644 --- a/host/host_freebsd.go +++ b/host/host_freebsd.go @@ -55,7 +55,7 @@ func HostInfo() (*HostInfoStat, error) { return ret, nil } -func BootTime() (int64, error) { +func BootTime() (uint64, error) { values, err := common.DoSysctrl("kern.boottime") if err != nil { return 0, err @@ -63,7 +63,7 @@ func BootTime() (int64, error) { // ex: { sec = 1392261637, usec = 627534 } Thu Feb 13 12:20:37 2014 v := strings.Replace(values[2], ",", "", 1) - boottime, err := strconv.ParseInt(v, 10, 64) + boottime, err := strconv.ParseUint(v, 10, 64) if err != nil { return 0, err }