Update shirou/gopsutil/313 to pull in lowercased HostIDs.

This commit is contained in:
Sean Chittenden 2017-02-06 16:27:56 -08:00
parent a87fea9ef4
commit 954168fe0c
No known key found for this signature in database
GPG key ID: 4EBC9DC16C2E5E16
5 changed files with 8 additions and 8 deletions

View file

@ -59,7 +59,7 @@ func Info() (*InfoStat, error) {
values, err := common.DoSysctrl("kern.uuid") values, err := common.DoSysctrl("kern.uuid")
if err == nil && len(values) == 1 && values[0] != "" { if err == nil && len(values) == 1 && values[0] != "" {
ret.HostID = values[0] ret.HostID = strings.ToLower(values[0])
} }
return ret, nil return ret, nil

View file

@ -62,7 +62,7 @@ func Info() (*InfoStat, error) {
values, err := common.DoSysctrl("kern.hostuuid") values, err := common.DoSysctrl("kern.hostuuid")
if err == nil && len(values) == 1 && values[0] != "" { if err == nil && len(values) == 1 && values[0] != "" {
ret.HostID = values[0] ret.HostID = strings.ToLower(values[0])
} }
return ret, nil return ret, nil

View file

@ -70,14 +70,14 @@ func Info() (*InfoStat, error) {
case common.PathExists(sysProductUUID): case common.PathExists(sysProductUUID):
lines, err := common.ReadLines(sysProductUUID) lines, err := common.ReadLines(sysProductUUID)
if err == nil && len(lines) > 0 && lines[0] != "" { if err == nil && len(lines) > 0 && lines[0] != "" {
ret.HostID = lines[0] ret.HostID = strings.ToLower(lines[0])
break break
} }
fallthrough fallthrough
default: default:
values, err := common.DoSysctrl("kernel.random.boot_id") values, err := common.DoSysctrl("kernel.random.boot_id")
if err == nil && len(values) == 1 && values[0] != "" { if err == nil && len(values) == 1 && values[0] != "" {
ret.HostID = values[0] ret.HostID = strings.ToLower(values[0])
} }
} }

View file

@ -64,7 +64,7 @@ func Info() (*InfoStat, error) {
{ {
hostID, err := getMachineGuid() hostID, err := getMachineGuid()
if err == nil { if err == nil {
ret.HostID = hostID ret.HostID = strings.ToLower(hostID)
} }
} }

6
vendor/vendor.json vendored
View file

@ -705,10 +705,10 @@
"revisionTime": "2017-02-04T05:36:48Z" "revisionTime": "2017-02-04T05:36:48Z"
}, },
{ {
"checksumSHA1": "j5cGmi4mFeXmsLpSTiakU/k7aOc=", "checksumSHA1": "GsqEEmGv6sj8DreS2SYXRkoZ9NI=",
"path": "github.com/shirou/gopsutil/host", "path": "github.com/shirou/gopsutil/host",
"revision": "32b6636de04b303274daac3ca2b10d3b0e4afc35", "revision": "36f5033d9787f85e97cc259fcb33bd699f3dbe0f",
"revisionTime": "2017-02-04T05:36:48Z" "revisionTime": "2017-02-07T00:10:46Z"
}, },
{ {
"checksumSHA1": "hz9RxkaV3Tnju2eiHBWO/Yv7n5c=", "checksumSHA1": "hz9RxkaV3Tnju2eiHBWO/Yv7n5c=",