Skip to content

Commit

Permalink
Print response body without quoting
Browse files Browse the repository at this point in the history
Quoting provided an odd output from functions like Figlet [1]

[1] openfaasltd/kafka-connector#25

Signed-off-by: Alex Ellis <alexellis2@gmail.com>
  • Loading branch information
alexellis committed Feb 11, 2019
1 parent a7925ed commit 07ccff0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion types/response_printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func (rp *ResponsePrinter) Response(res InvokerResponse) {
} else {
log.Printf("connector-sdk got result: [%d] %s => %s (%d) bytes", res.Status, res.Topic, res.Function, len(*res.Body))
if rp.PrintResponseBody {
fmt.Printf("[%d] %s => %s\n%q\n", res.Status, res.Topic, res.Function, string(*res.Body))
fmt.Printf("[%d] %s => %s\n%s\n", res.Status, res.Topic, res.Function, string(*res.Body))
}
}
}

0 comments on commit 07ccff0

Please sign in to comment.