Add configuration and annotation for port_in_redirect

This commit is contained in:
Manuel de Brito Fontes 2017-01-20 19:37:59 -03:00
parent db17db812d
commit 3df139cb56
14 changed files with 249 additions and 72 deletions

View file

@ -37,9 +37,9 @@ var (
)
// NewInvalidAnnotationContent returns a new InvalidContent error
func NewInvalidAnnotationContent(name string) error {
func NewInvalidAnnotationContent(name string, val interface{}) error {
return InvalidContent{
Name: fmt.Sprintf("the annotation %v does not contains a valid value", name),
Name: fmt.Sprintf("the annotation %v does not contains a valid value (%v)", name, val),
}
}

View file

@ -38,7 +38,7 @@ func TestInvalidContent(t *testing.T) {
if IsInvalidContent(ErrMissingAnnotations) {
t.Error("expected false")
}
err := NewInvalidAnnotationContent("demo")
err := NewInvalidAnnotationContent("demo", "")
if !IsInvalidContent(err) {
t.Error("expected true")
}