summaryrefslogtreecommitdiff
path: root/test/utils/utils.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-08-03 09:10:53 -0400
committerGitHub <noreply@github.com>2020-08-03 09:10:53 -0400
commitde5eb3831190262169eab36e64c41992dc22766a (patch)
tree66594f108877fa59012ba371fb19474bb6aa6d4e /test/utils/utils.go
parent41358f5ea06062f1e1b80bd29802ea5d51cfe3b1 (diff)
parentfef3e2da6a2024fff5142b5df80aba36e895ed73 (diff)
downloadpodman-de5eb3831190262169eab36e64c41992dc22766a.tar.gz
podman-de5eb3831190262169eab36e64c41992dc22766a.tar.bz2
podman-de5eb3831190262169eab36e64c41992dc22766a.zip
Merge pull request #7191 from openSUSE/printf
Remove some unnecessary []byte to string conversions
Diffstat (limited to 'test/utils/utils.go')
-rw-r--r--test/utils/utils.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/utils/utils.go b/test/utils/utils.go
index 0597cd292..2c454f532 100644
--- a/test/utils/utils.go
+++ b/test/utils/utils.go
@@ -215,7 +215,7 @@ func (s *PodmanSession) OutputToString() string {
// where each array item is a line split by newline
func (s *PodmanSession) OutputToStringArray() []string {
var results []string
- output := fmt.Sprintf("%s", s.Out.Contents())
+ output := string(s.Out.Contents())
for _, line := range strings.Split(output, "\n") {
if line != "" {
results = append(results, line)
@@ -226,14 +226,14 @@ func (s *PodmanSession) OutputToStringArray() []string {
// ErrorToString formats session stderr to string
func (s *PodmanSession) ErrorToString() string {
- fields := strings.Fields(fmt.Sprintf("%s", s.Err.Contents()))
+ fields := strings.Fields(string(s.Err.Contents()))
return strings.Join(fields, " ")
}
// ErrorToStringArray returns the stderr output as a []string
// where each array item is a line split by newline
func (s *PodmanSession) ErrorToStringArray() []string {
- output := fmt.Sprintf("%s", s.Err.Contents())
+ output := string(s.Err.Contents())
return strings.Split(output, "\n")
}