mirror of
https://github.com/TwiN/gatus.git
synced 2024-11-24 17:04:42 +01:00
inline json.Marshal return
This commit is contained in:
parent
fc4858b1a8
commit
fb5477f50b
@ -24,8 +24,7 @@ var (
|
|||||||
// GetServiceStatusesAsJSON returns a list of core.ServiceStatus for each services encoded using json.Marshal.
|
// GetServiceStatusesAsJSON returns a list of core.ServiceStatus for each services encoded using json.Marshal.
|
||||||
func GetServiceStatusesAsJSON() ([]byte, error) {
|
func GetServiceStatusesAsJSON() ([]byte, error) {
|
||||||
serviceStatuses := store.GetAll()
|
serviceStatuses := store.GetAll()
|
||||||
data, err := json.Marshal(serviceStatuses)
|
return json.Marshal(serviceStatuses)
|
||||||
return data, err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetUptimeByServiceGroupAndName returns the uptime of a service based on its group and name
|
// GetUptimeByServiceGroupAndName returns the uptime of a service based on its group and name
|
||||||
|
Loading…
Reference in New Issue
Block a user