Changing StatusResponse.Len to .Size
This commit is contained in:
parent
9427fe91b1
commit
d1223fc170
2 changed files with 3 additions and 3 deletions
|
@ -72,7 +72,7 @@ func statusCmd(args []string) error {
|
||||||
}
|
}
|
||||||
fmt.Printf("%s\n", prettyJSON)
|
fmt.Printf("%s\n", prettyJSON)
|
||||||
case "plain":
|
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())
|
fmt.Printf("Server Status: %s\n", respJSON["status"].Status())
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|
4
hub.go
4
hub.go
|
@ -49,7 +49,7 @@ type CommandResponse struct {
|
||||||
|
|
||||||
// StatusResponse is an implementation of a CommandResponse
|
// StatusResponse is an implementation of a CommandResponse
|
||||||
type StatusResponse struct {
|
type StatusResponse struct {
|
||||||
Len int `json:"length"`
|
Size int `json:"size"`
|
||||||
IsRunning bool `json:"running"`
|
IsRunning bool `json:"running"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ func (h *Hub) Run() {
|
||||||
cmd.Response <- CommandResponse{Value: active}
|
cmd.Response <- CommandResponse{Value: active}
|
||||||
case CommandStatus:
|
case CommandStatus:
|
||||||
var resp = StatusResponse{
|
var resp = StatusResponse{
|
||||||
Len: h.circbuf.Len(),
|
Size: h.circbuf.Len(),
|
||||||
IsRunning: active,
|
IsRunning: active,
|
||||||
}
|
}
|
||||||
cmd.Response <- CommandResponse{Value: resp}
|
cmd.Response <- CommandResponse{Value: resp}
|
||||||
|
|
Loading…
Reference in a new issue