diff options
author | Ben Morrison <ben@gbmor.dev> | 2020-05-09 17:21:11 -0400 |
---|---|---|
committer | Ben Morrison <ben@gbmor.dev> | 2020-05-09 17:21:11 -0400 |
commit | 825c7e2cd4cc77024c20e31224e3d311196d8e80 (patch) | |
tree | 68c407a4ff495d83d10a10d7c4739cebfdd7e016 /uptime.go | |
parent | 3565a2f54ac9892330a938c0c873e607783208d9 (diff) | |
download | api-825c7e2cd4cc77024c20e31224e3d311196d8e80.tar.gz |
fixed json formatting: removed leading space, added trailing newline
Diffstat (limited to 'uptime.go')
-rw-r--r-- | uptime.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/uptime.go b/uptime.go index 2dd45f3..07bcc47 100644 --- a/uptime.go +++ b/uptime.go @@ -28,12 +28,12 @@ func uptimeQuery(format string) ([]byte, error) { loadcomb := strings.Split(string(split[3]), " ") loads := fmt.Sprintf("%s,%s,%s", loadcomb[1], split[3], split[4]) - json := fmt.Sprintf(` -{ + json := fmt.Sprintf(`{ "time": "%s", "up": "%s", "load": "%s" -}`, time, up, loads) +} +`, time, up, loads) return []byte(json), nil } |