From 75fdbb39a7120af0fe695af76fec18aed9bac954 Mon Sep 17 00:00:00 2001 From: ahusic Date: Wed, 20 May 2020 13:20:34 +0200 Subject: [PATCH] CLEANUP: environment-check: remove redundant slice `Find` func accepts slice array and since `out` variable satisfies this, there is no need for additional `[]byte(out)` call. --- haproxy/haproxy_cmd/run.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/haproxy/haproxy_cmd/run.go b/haproxy/haproxy_cmd/run.go index 8e69370..10c22c2 100644 --- a/haproxy/haproxy_cmd/run.go +++ b/haproxy/haproxy_cmd/run.go @@ -113,7 +113,7 @@ func execAndCapture(path string, re *regexp.Regexp) (string, error) { if err != nil { return "", fmt.Errorf("Failed executing %s: %s", path, err.Error()) } - return string(re.Find([]byte(out))), nil + return string(re.Find(out)), nil } // CheckEnvironment Verifies that all dependencies are correct