Skip to content

Commit

Permalink
xml: Fix "right hand must be only type assertion" by igoring cast err…
Browse files Browse the repository at this point in the history
…or more explicitly
  • Loading branch information
wader committed Feb 14, 2025
1 parent b59fc57 commit 1a3232f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion format/xml/xml.go
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,8 @@ func toXMLFromObject(c any, opts ToXMLOpts) any {
switch {
case k == "#seq":
hasSeq = true
seq, _ = strconv.Atoi(v.(string))
s, _ := v.(string)
seq, _ = strconv.Atoi(s)
case k == "#text":
s, _ := v.(string)
n.Chardata = []byte(s)
Expand Down

0 comments on commit 1a3232f

Please sign in to comment.