Skip to content

Commit eaf5442

Browse files
authored
CLEANUP: environment-check: remove redundant slice (#53)
`Find` func accepts slice array and since `out` variable satisfies this, there is no need for additional `[]byte(out)` call.
1 parent f98576a commit eaf5442

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

haproxy/haproxy_cmd/run.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ func execAndCapture(path string, re *regexp.Regexp) (string, error) {
113113
if err != nil {
114114
return "", fmt.Errorf("Failed executing %s: %s", path, err.Error())
115115
}
116-
return string(re.Find([]byte(out))), nil
116+
return string(re.Find(out)), nil
117117
}
118118

119119
// CheckEnvironment Verifies that all dependencies are correct

0 commit comments

Comments
 (0)