1
0
Fork 0
forked from boyska/circolog

Changing StatusResponse.Len to .Size

This commit is contained in:
Blallo 2019-01-03 11:51:14 +01:00
parent 9427fe91b1
commit d1223fc170
No known key found for this signature in database
GPG key ID: 0CBE577C9B72DC3F
2 changed files with 3 additions and 3 deletions

View file

@ -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

4
hub.go
View file

@ -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}