Skip to content
This repository has been archived by the owner on May 25, 2022. It is now read-only.

Commit

Permalink
feat: trim whitechars in decoder due to multiline
Browse files Browse the repository at this point in the history
Signed-off-by: Dominik Rosiek <[email protected]>
  • Loading branch information
Dominik Rosiek committed Jul 6, 2021
1 parent 5538de5 commit 864c23a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion operator/helper/encoding.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func (e *Encoding) Decode(msgBuf []byte) (string, error) {
decoder.Reset()
nDst, _, err := decoder.Transform(decodeBuffer, msgBuf, true)
if err == nil {
return string(decodeBuffer[:nDst]), nil
return strings.TrimRight(string(decodeBuffer[:nDst]), "\r\t \n"), nil
}
if err == transform.ErrShortDst {
decodeBuffer = make([]byte, len(decodeBuffer)*2)
Expand Down

0 comments on commit 864c23a

Please sign in to comment.