From fa7833a74969c60f223da1c07f71fd011ff81a96 Mon Sep 17 00:00:00 2001 From: Renan DelValle Date: Wed, 4 Oct 2017 14:34:47 -0700 Subject: [PATCH] Updating client to reflect changes made on the Monitor's side --- examples/client.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/examples/client.go b/examples/client.go index b6f9df5..5719178 100644 --- a/examples/client.go +++ b/examples/client.go @@ -548,16 +548,15 @@ func main() { } // Monitor change to DRAINING and DRAINED mode - nontransitioned, err := monitor.HostMaintenance( + hostsResult, err := monitor.HostMaintenance( hosts, []aurora.MaintenanceMode{aurora.MaintenanceMode_NONE}, 5, 10) if err != nil { - // Check whether the call was partially successful - if len(nontransitioned) != 0 { - fmt.Println("Partial success:") - for host, _ := range nontransitioned { + fmt.Println("Partial success:") + for host, ok := range hostsResult { + if !ok { fmt.Printf("Host %s did not transtion into desired mode(s)\n", host) } }