Skip to content

Commit

Permalink
Add json output for cluster node list command (#247)
Browse files Browse the repository at this point in the history
  • Loading branch information
harshitha-yb authored Sep 4, 2024
1 parent 79c2fd2 commit 9763611
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions internal/formatter/nodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package formatter

import (
"encoding/json"
"fmt"
"runtime"
"sort"
Expand Down Expand Up @@ -122,9 +123,9 @@ func (n *NodeContext) MemoryUsed() string {
// return e.e.GetHost()
// }

// func (n *NodeContext) MarshalJSON() ([]byte, error) {
// return json.Marshal(e.e)
// }
func (n *NodeContext) MarshalJSON() ([]byte, error) {
return json.Marshal(n.n)
}

func NodeTypeToEmoji(nodeType bool) string {

Expand Down

0 comments on commit 9763611

Please sign in to comment.