From fb5477f50bc887b5103b8e648d1a02b45d1f3eea Mon Sep 17 00:00:00 2001 From: Chris Heppell Date: Thu, 31 Dec 2020 22:00:38 +0000 Subject: [PATCH] inline json.Marshal return --- watchdog/watchdog.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/watchdog/watchdog.go b/watchdog/watchdog.go index 7e7664f0..b307b140 100644 --- a/watchdog/watchdog.go +++ b/watchdog/watchdog.go @@ -24,8 +24,7 @@ var ( // GetServiceStatusesAsJSON returns a list of core.ServiceStatus for each services encoded using json.Marshal. func GetServiceStatusesAsJSON() ([]byte, error) { serviceStatuses := store.GetAll() - data, err := json.Marshal(serviceStatuses) - return data, err + return json.Marshal(serviceStatuses) } // GetUptimeByServiceGroupAndName returns the uptime of a service based on its group and name