Fix some typos and run gofmt on all .go files

This commit is contained in:
Matthew Penner
2020-09-05 13:08:40 -06:00
parent b9f6e17a7d
commit 7ba32aca84
42 changed files with 89 additions and 84 deletions

View File

@@ -39,8 +39,12 @@ func (s *Server) emitProcUsage() {
s.resources.mu.RLock()
defer s.resources.mu.RUnlock()
b, _ := json.Marshal(s.resources)
s.Events().Publish(StatsEvent, string(b))
b, err := json.Marshal(s.resources)
if err == nil {
s.Events().Publish(StatsEvent, string(b))
}
// TODO: This might be a good place to add a debug log if stats are not sending.
}
// Returns the servers current state.