From d1223fc17049f46ce17a491080dd70bc0ed8f77b Mon Sep 17 00:00:00 2001 From: Blallo Date: Thu, 3 Jan 2019 11:51:14 +0100 Subject: [PATCH] Changing StatusResponse.Len to .Size --- cmd/circologctl/main.go | 2 +- hub.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/circologctl/main.go b/cmd/circologctl/main.go index 4e21768..c924ce1 100644 --- a/cmd/circologctl/main.go +++ b/cmd/circologctl/main.go @@ -72,7 +72,7 @@ func statusCmd(args []string) error { } fmt.Printf("%s\n", prettyJSON) case "plain": - fmt.Printf("Buffer Length: %d\n", respJSON["status"].Len) + fmt.Printf("Buffer Length: %d\n", respJSON["status"].Size) fmt.Printf("Server Status: %s\n", respJSON["status"].Status()) } return nil diff --git a/hub.go b/hub.go index dfb760d..c3b07e0 100644 --- a/hub.go +++ b/hub.go @@ -49,7 +49,7 @@ type CommandResponse struct { // StatusResponse is an implementation of a CommandResponse type StatusResponse struct { - Len int `json:"length"` + Size int `json:"size"` IsRunning bool `json:"running"` } @@ -154,7 +154,7 @@ func (h *Hub) Run() { cmd.Response <- CommandResponse{Value: active} case CommandStatus: var resp = StatusResponse{ - Len: h.circbuf.Len(), + Size: h.circbuf.Len(), IsRunning: active, } cmd.Response <- CommandResponse{Value: resp}