Merge pull request #1747 from technosophos/ref/minor-error-refactor

ref(tiller): minor style refactor
pull/1750/head
Matt Butcher 8 years ago committed by GitHub
commit a95bd105f0

@ -37,14 +37,9 @@ func getNamespace(client internalclientset.Interface, namespace string) (*api.Na
} }
func ensureNamespace(client internalclientset.Interface, namespace string) error { func ensureNamespace(client internalclientset.Interface, namespace string) error {
if _, getError := getNamespace(client, namespace); getError != nil && errors.IsNotFound(getError) { _, err := getNamespace(client, namespace)
createError := createNamespace(client, namespace) if err != nil && errors.IsNotFound(err) {
if createError != nil { return createNamespace(client, namespace)
return createError
} }
} else if getError != nil { return err
return getError
}
return nil
} }

Loading…
Cancel
Save