Skip to content

Conversation

@ryantxu
Copy link
Contributor

@ryantxu ryantxu commented Mar 8, 2024

#897 ignores the complex values when setting values via map. This fixes that error

@ryantxu ryantxu added the bug Something isn't working label Mar 8, 2024
@ryantxu ryantxu requested review from a team as code owners March 8, 2024 05:59
@ryantxu ryantxu requested review from andresmgot, oshirohugo, toddtreece and wbrowne and removed request for a team March 8, 2024 05:59
body, err := json.Marshal(val)
if err != nil {
if err == nil {
_ = json.Unmarshal(body, &g.Datasource)
Copy link
Member

@toddtreece toddtreece Mar 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should these unmarshal errors be handled/logged?

Comment on lines 233 to 236
ii, ok := v.(int)
if ok {
return float64(ii), nil
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is already covered in the lines just above

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dooh -- thanks

@ryantxu ryantxu requested a review from toddtreece March 11, 2024 23:29
@ryantxu ryantxu merged commit 07c6088 into main Mar 11, 2024
@ryantxu ryantxu deleted the fix-map-setters branch March 11, 2024 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants