From 049790918ca555d5cc08d345f379b5c1d08aa310 Mon Sep 17 00:00:00 2001 From: Andreas Kohn Date: Mon, 3 Apr 2017 12:22:08 +0200 Subject: [PATCH] Fix a couple of 'does not contains' typos --- core/pkg/ingress/annotations/auth/main.go | 2 +- core/pkg/ingress/annotations/ipwhitelist/main.go | 2 +- core/pkg/ingress/controller/annotations.go | 2 +- core/pkg/ingress/controller/controller.go | 4 ++-- core/pkg/ingress/errors/errors.go | 6 +++--- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/core/pkg/ingress/annotations/auth/main.go b/core/pkg/ingress/annotations/auth/main.go index fe2167f03f..246ea31327 100644 --- a/core/pkg/ingress/annotations/auth/main.go +++ b/core/pkg/ingress/annotations/auth/main.go @@ -125,7 +125,7 @@ func dumpSecret(filename string, secret *api.Secret) error { val, ok := secret.Data["auth"] if !ok { return ing_errors.LocationDenied{ - Reason: errors.Errorf("the secret %v does not contains a key with value auth", secret.Name), + Reason: errors.Errorf("the secret %v does not contain a key with value auth", secret.Name), } } diff --git a/core/pkg/ingress/annotations/ipwhitelist/main.go b/core/pkg/ingress/annotations/ipwhitelist/main.go index d42f0fad3e..40ca96c22f 100644 --- a/core/pkg/ingress/annotations/ipwhitelist/main.go +++ b/core/pkg/ingress/annotations/ipwhitelist/main.go @@ -65,7 +65,7 @@ func (a ipwhitelist) Parse(ing *extensions.Ingress) (interface{}, error) { ipnets, err := sets.ParseIPNets(values...) if err != nil { return &SourceRange{CIDR: defBackend.WhitelistSourceRange}, ing_errors.LocationDenied{ - Reason: errors.Wrap(err, "the annotation does not contains a valid IP address or network"), + Reason: errors.Wrap(err, "the annotation does not contain a valid IP address or network"), } } diff --git a/core/pkg/ingress/controller/annotations.go b/core/pkg/ingress/controller/annotations.go index b0ab4218b8..5f05681ae8 100644 --- a/core/pkg/ingress/controller/annotations.go +++ b/core/pkg/ingress/controller/annotations.go @@ -139,7 +139,7 @@ func (e *annotationExtractor) ContainsCertificateAuth(ing *extensions.Ingress) b func (e *annotationExtractor) CertificateAuthSecret(ing *extensions.Ingress) (*api.Secret, error) { val, _ := parser.GetStringAnnotation("ingress.kubernetes.io/auth-tls-secret", ing) if val == "" { - return nil, fmt.Errorf("ingress rule %v/%v does not contains the auth-tls-secret annotation", ing.Namespace, ing.Name) + return nil, fmt.Errorf("ingress rule %v/%v does not contain the auth-tls-secret annotation", ing.Namespace, ing.Name) } return e.secretResolver.GetSecret(val) diff --git a/core/pkg/ingress/controller/controller.go b/core/pkg/ingress/controller/controller.go index 82bedae325..13751d2db2 100644 --- a/core/pkg/ingress/controller/controller.go +++ b/core/pkg/ingress/controller/controller.go @@ -632,7 +632,7 @@ func (ic *GenericController) getBackendServers() ([]*ingress.Backend, []*ingress if rule.HTTP == nil && host != defServerName { - glog.V(3).Infof("ingress rule %v/%v does not contains HTTP rules. using default backend", ing.Namespace, ing.Name) + glog.V(3).Infof("ingress rule %v/%v does not contain HTTP rules, using default backend", ing.Namespace, ing.Name) continue } @@ -996,7 +996,7 @@ func (ic *GenericController) createServers(data []interface{}, servers[host].SSLCertificate = cert.PemFileName servers[host].SSLPemChecksum = cert.PemSHA } else { - glog.Warningf("ssl certificate %v does not contains a common name for host %v", key, host) + glog.Warningf("ssl certificate %v does not contain a common name for host %v", key, host) } } else { glog.Warningf("ssl certificate \"%v\" does not exist in local store", key) diff --git a/core/pkg/ingress/errors/errors.go b/core/pkg/ingress/errors/errors.go index 8db16c780e..6a4d0d5ce7 100644 --- a/core/pkg/ingress/errors/errors.go +++ b/core/pkg/ingress/errors/errors.go @@ -23,7 +23,7 @@ import ( ) var ( - // ErrMissingAnnotations the ingress rule does not contains annotations + // ErrMissingAnnotations the ingress rule does not contain annotations // This is an error only when annotations are being parsed ErrMissingAnnotations = errors.New("ingress rule without annotations") @@ -39,7 +39,7 @@ var ( // NewInvalidAnnotationContent returns a new InvalidContent error func NewInvalidAnnotationContent(name string, val interface{}) error { return InvalidContent{ - Name: fmt.Sprintf("the annotation %v does not contains a valid value (%v)", name, val), + Name: fmt.Sprintf("the annotation %v does not contain a valid value (%v)", name, val), } } @@ -76,7 +76,7 @@ func IsLocationDenied(e error) bool { } // IsMissingAnnotations checks if the err is an error which -// indicates the ingress does not contains annotations +// indicates the ingress does not contain annotations func IsMissingAnnotations(e error) bool { return e == ErrMissingAnnotations }