Skip to content

Commit

Permalink
return decoder
Browse files Browse the repository at this point in the history
  • Loading branch information
S Riemersma committed Oct 1, 2021
1 parent d59244d commit 3e92445
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ func (dec *Decoder) UseAutoConvertWithTrimSpace() {

// UseAutoTrimSpace causes the Decoder to unmarshal a string literal and trim
// any leading or ending spaces in the string.
func (dec *Decoder) UseAutoTrimSpace() { dec.d.stringTrimSpace = true }
func (dec *Decoder) UseAutoTrimSpace() *Decoder {
dec.d.stringTrimSpace = true
return dec
}

// UseIgnoreEmpty causes the Decoder to ignore empty objects in json.
func (dec *Decoder) IgnoreEmptyObject() { dec.d.ignoreEmpty = true }
Expand Down

0 comments on commit 3e92445

Please sign in to comment.