fix err handling bug
This commit is contained in:
parent
20d867bfcb
commit
36b971a930
@ -202,7 +202,9 @@ func getHostInfo(nodeName string) (h HostInfo, err error) {
|
|||||||
h.name = strings.TrimSpace(nodeName)
|
h.name = strings.TrimSpace(nodeName)
|
||||||
|
|
||||||
id, errL := os.ReadFile(MACHINEID)
|
id, errL := os.ReadFile(MACHINEID)
|
||||||
|
if errL != nil {
|
||||||
err = errAppend(err, fmt.Errorf("id: %w", errL))
|
err = errAppend(err, fmt.Errorf("id: %w", errL))
|
||||||
|
}
|
||||||
|
|
||||||
h.id = strings.TrimSpace(string(id))
|
h.id = strings.TrimSpace(string(id))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user