Skip to content

Commit

Permalink
refs #309, unmarshalling AutoDelete: "undefined" to false not true
Browse files Browse the repository at this point in the history
`exchange.auto_delete` should not be `undefined` -> now defaults to
`false` when it's string `"undefined"`.
  • Loading branch information
pafmaf authored and michaelklishin committed Jun 15, 2024
1 parent 8c6d345 commit 8b4162c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ type AutoDelete bool
func (d *AutoDelete) UnmarshalJSON(b []byte) error {
switch string(b) {
case "\"undefined\"":
// auto_delete is "undefined", map it to true
*d = AutoDelete(true)
// auto_delete is "undefined", map it to false
*d = AutoDelete(false)
case "true":
*d = AutoDelete(true)
case "false":
Expand Down

0 comments on commit 8b4162c

Please sign in to comment.