diff options
| author | Jeff Carr <[email protected]> | 2024-10-22 04:37:28 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-10-22 04:37:28 -0500 |
| commit | 104aa512600682f8221ed2c6e0e3538336a969f3 (patch) | |
| tree | 43935b71cd5d1b71286f5d2fc75a85d6e0fac0ab /configfile/main.go | |
| parent | ca0d4f423a7892f582eced971a31caab1add9c02 (diff) | |
add JSON export
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'configfile/main.go')
| -rw-r--r-- | configfile/main.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/configfile/main.go b/configfile/main.go index eba2dd8..abc306a 100644 --- a/configfile/main.go +++ b/configfile/main.go @@ -36,6 +36,13 @@ func main() { for _, h := range aCluster.Hypervisors { log.Println("\thypervisor =", h.Hostname, h.GetMemoryPrintable()) } + + b, err := aCluster.MarshalJSON() + if err != nil { + log.Println("json failed") + } else { + log.Println(string(b)) + } } func marshalWriteToFile(myWriter *bufio.Writer, c *pb.Cluster) { |
