From c9d5bc8a086a75dc86c3f91f3d8123d073c12f9c Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Thu, 25 Jun 2020 10:35:19 +0200 Subject: [PATCH] cleanup: use errors.As() in e2e/utils See-also: https://github.com/golang/go/wiki/ErrorValueFAQ#how-should-i-change-my-error-handling-code-to-work-with-the-new-features Signed-off-by: Niels de Vos --- e2e/utils.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/e2e/utils.go b/e2e/utils.go index f13b056ce..deafedd8e 100644 --- a/e2e/utils.go +++ b/e2e/utils.go @@ -375,7 +375,8 @@ func getSecret(path string) v1.Secret { err := unmarshal(path, &sc) // discard corruptInputError if err != nil { - if _, ok := err.(base64.CorruptInputError); !ok { + var b64cie base64.CorruptInputError + if !errors.As(err, &b64cie) { Expect(err).Should(BeNil()) } }