Skip to content

Commit 113e055

Browse files
committed
use os.Stdout.WriteString instead of fmt.Printf
Signed-off-by: Oleg <97077423+RobotSail@users.noreply.github.com>
1 parent 50803b2 commit 113e055

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pkg/cmd/utils.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,10 @@ func PrintOrWriteOut(r *Request) error {
135135
if err != nil {
136136
return err
137137
}
138-
// stringOut := strings.ReplaceAll(fmOutput, "\\n", "\n")
139-
fmt.Printf("%s\n", fmOutput)
138+
_, err = os.Stdout.WriteString(fmOutput)
139+
if err != nil {
140+
return fmt.Errorf("could not write to stdout: %w", err)
141+
}
140142

141143
return nil
142144
}

0 commit comments

Comments
 (0)