commit d65c457cdb78bfe473db953cb4cd0f8243ec21be from: Oliver Lowe date: Sat Apr 22 06:31:42 2023 UTC Trim const type prefix Not needed and easier to read when exposed in UI. commit - 6c821dbc0890acc0ce1ff7c6a98523aa7fca0573 commit + d65c457cdb78bfe473db953cb4cd0f8243ec21be blob - f37d14e5e95dac8a319d3ea3c23f5738647bcb9d blob + 8ea32ade8dbf8499d464ae92c1b7247050f48385 --- host.go +++ host.go @@ -40,9 +40,9 @@ const ( func (state HostState) String() string { switch state { case HostUp: - return "HostUp" + return "Up" case HostDown: - return "HostDown" + return "Down" } return "HostUnreachable" } blob - 3d7e59929d514119e17cd7950c391c7d6cf26420 blob + 15d22e6985de84830042e6b9dff180d80b575c8e --- service.go +++ service.go @@ -47,13 +47,13 @@ const ( func (state ServiceState) String() string { switch state { case ServiceOK: - return "ServiceOK" + return "OK" case ServiceWarning: - return "ServiceWarning" + return "Warning" case ServiceCritical: - return "ServiceCritical" + return "Critical" } - return "ServiceUnknown" + return "Unknown" } // UnmarshalJSON unmarshals service attributes into more meaningful Service field types.