summaryrefslogtreecommitdiff
path: root/dump.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-10-30 12:16:08 -0500
committerJeff Carr <[email protected]>2024-10-30 12:16:08 -0500
commit410015c33e7d905ee03fab29d24961aab9df093f (patch)
tree9597ef87a0dc4add212e5924caaee6a7d5d925ae /dump.go
parentc8a69bdb73fedb7bd7afd05318021e487b47bd17 (diff)
more work on create() droplet
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'dump.go')
-rw-r--r--dump.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/dump.go b/dump.go
index e8522d5..6d46c30 100644
--- a/dump.go
+++ b/dump.go
@@ -31,14 +31,14 @@ func dumpCluster(w http.ResponseWriter) {
// list running droplets and droplets that should be running
func dumpDroplets(w http.ResponseWriter, full bool) {
- for i, d := range me.cluster.Droplets {
+ for _, d := range me.cluster.Droplets {
var macs []string
for _, n := range d.Networks {
macs = append(macs, n.Mac)
}
// this line in golang could replace 80 lines of COBOL
- header := fmt.Sprintf("%3d %20s %3s %8s", i, strings.Join(macs, " "), d.CurrentState, d.CurrentHypervisor)
+ header := fmt.Sprintf("%-3s %20s %-8s", d.CurrentState, strings.Join(macs, " "), d.CurrentHypervisor)
var filenames string
for _, disk := range d.Disks {