commit d65c457cdb78bfe473db953cb4cd0f8243ec21be
parent 6c821dbc0890acc0ce1ff7c6a98523aa7fca0573
Author: Oliver Lowe <o@olowe.co>
Date: Sat, 22 Apr 2023 16:31:42 +1000
Trim const type prefix
Not needed and easier to read when exposed in UI.
Diffstat:
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/host.go b/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"
}
diff --git a/service.go b/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.