From fef3e2da6a2024fff5142b5df80aba36e895ed73 Mon Sep 17 00:00:00 2001 From: Sascha Grunert Date: Mon, 3 Aug 2020 09:13:04 +0200 Subject: Remove some unnecessary []byte to string conversions Some calls to `Sprintf("%s")` can be avoided by using direct string type assertions. Signed-off-by: Sascha Grunert --- test/e2e/search_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/e2e/search_test.go') diff --git a/test/e2e/search_test.go b/test/e2e/search_test.go index 104bb4ec8..c6766fe2a 100644 --- a/test/e2e/search_test.go +++ b/test/e2e/search_test.go @@ -103,7 +103,7 @@ registries = ['{{.Host}}:{{.Port}}']` search := podmanTest.Podman([]string{"search", "quay.io/libpod/whalesay"}) search.WaitWithDefaultTimeout() Expect(search.ExitCode()).To(Equal(0)) - output := fmt.Sprintf("%s", search.Out.Contents()) + output := string(search.Out.Contents()) match, _ := regexp.MatchString(`(?m)^quay.io\s+quay.io/libpod/whalesay\s+Static image used for automated testing.+$`, output) Expect(match).To(BeTrue()) }) -- cgit v1.2.3-54-g00ecf