Browse Source

Changing StatusResponse.Len to .Size

Blallo 5 years ago
parent
commit
d1223fc170
2 changed files with 3 additions and 3 deletions
  1. 1 1
      cmd/circologctl/main.go
  2. 2 2
      hub.go

+ 1 - 1
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

+ 2 - 2
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}