cmd: minikube: print newlines for service not ready

No newlines were printed before which made it look weird.
pull/607/head
Brandon Philips 2016-09-17 16:35:22 -07:00
parent d672573cef
commit 010502866b
1 changed files with 4 additions and 2 deletions

View File

@ -99,14 +99,16 @@ func CheckService(namespace string, service string) error {
return CheckEndpointReady(endpoint)
}
const notReadyMsg = "Waiting, endpoint for service is not ready yet...\n"
func CheckEndpointReady(endpoint *kubeApi.Endpoints) error {
if len(endpoint.Subsets) == 0 {
fmt.Fprintf(os.Stderr, "Waiting, endpoint for service is not ready yet...")
fmt.Fprintf(os.Stderr, notReadyMsg)
return errors.New("Endpoint for service is not ready yet")
}
for _, subset := range endpoint.Subsets {
if len(subset.NotReadyAddresses) != 0 {
fmt.Fprintf(os.Stderr, "Waiting, endpoint for service is not ready yet...")
fmt.Fprintf(os.Stderr, notReadyMsg)
return errors.New("Endpoint for service is not ready yet")
}
}