Skip to content

Commit

Permalink
Add json output for cluster node list command
Browse files Browse the repository at this point in the history
  • Loading branch information
harshitha-yb committed Sep 4, 2024
1 parent 79c2fd2 commit d93e50c
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 d93e50c

Please sign in to comment.