From 6b42362f37ed53e422fd7d26f6860b6d49c13b0f Mon Sep 17 00:00:00 2001 From: Gregory Kurtzer Date: Fri, 31 Dec 2021 01:00:18 +0000 Subject: [PATCH] Fixed linting errors --- internal/pkg/warewulfd/status.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/internal/pkg/warewulfd/status.go b/internal/pkg/warewulfd/status.go index 2fc19301..ac87ef89 100644 --- a/internal/pkg/warewulfd/status.go +++ b/internal/pkg/warewulfd/status.go @@ -26,7 +26,7 @@ func init() { statusDB.Nodes = make(map[string]*NodeStatus) } -func updateStatus(nodeID, stage, sent, ipaddr string) error { +func updateStatus(nodeID, stage, sent, ipaddr string) { rightnow := time.Now().Unix() wwlog.Printf(wwlog.DEBUG, "Updating node status data: %s\n", nodeID) @@ -37,8 +37,6 @@ func updateStatus(nodeID, stage, sent, ipaddr string) error { n.Sent = sent n.Ipaddr = ipaddr statusDB.Nodes[nodeID] = &n - - return nil } func statusJSON() ([]byte, error) { @@ -60,5 +58,8 @@ func StatusSend(w http.ResponseWriter, req *http.Request) { return } - w.Write(status) + _, err = w.Write(status) + if err != nil { + wwlog.Printf(wwlog.WARN, "Could not send status JSON: %s\n", err) + } }