Skip to content

Commit

Permalink
use os.Stdout.WriteString instead of fmt.Printf
Browse files Browse the repository at this point in the history
Signed-off-by: Oleg <[email protected]>
  • Loading branch information
RobotSail committed Nov 4, 2022
1 parent 50803b2 commit 113e055
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/cmd/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,10 @@ func PrintOrWriteOut(r *Request) error {
if err != nil {
return err
}
// stringOut := strings.ReplaceAll(fmOutput, "\\n", "\n")
fmt.Printf("%s\n", fmOutput)
_, err = os.Stdout.WriteString(fmOutput)
if err != nil {
return fmt.Errorf("could not write to stdout: %w", err)
}

return nil
}
Expand Down

0 comments on commit 113e055

Please sign in to comment.