diff options
| author | Jeff Carr <[email protected]> | 2024-10-22 03:50:01 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-10-22 03:50:01 -0500 |
| commit | 8cab0857fda04a5e9b06860aec15d05342b747f1 (patch) | |
| tree | 6789fdafd3a336696ef3b285d7fd728f90268e38 /configfile/main.go | |
| parent | c9c0abc440e15bb23f7569f7691232f9ab3baf0e (diff) | |
next step, write out yaml or json
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'configfile/main.go')
| -rw-r--r-- | configfile/main.go | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/configfile/main.go b/configfile/main.go index 627649f..4e873fa 100644 --- a/configfile/main.go +++ b/configfile/main.go @@ -26,9 +26,15 @@ func main() { log.Fatalln("Failed to parse droplet:", err) } - log.Println(aCluster) - for i, d := range aCluster.Droplets { - log.Println("\tdrop =", i, d) + // log.Println(aCluster) + // show the droplets to STDOUT + for _, d := range aCluster.Droplets { + log.Println("\tdroplet =", d.Hostname, "preffered host:", d.PreferredHypervisor) + } + + // show the hypervisors to STDOUT + for _, h := range aCluster.Hypervisors { + log.Println("\thypervisor =", h.Hostname) } } @@ -50,7 +56,7 @@ func marshalWriteToFile(myWriter *bufio.Writer, c *pb.Cluster) { func TestWriteCluster() { buf := new(bytes.Buffer) - c := pb.CreateSampleCluster(3) + c := pb.CreateSampleCluster(7) got := buf.String() log.Println(got) |
