8000 fix(testdata): load should not clobber initial values when decoding json by dominicbarnes · Pull Request #6 · dominicbarnes/got · GitHub
[go: up one dir, main page]

Skip to content

fix(testdata): load should not clobber initial values when decoding json - #6

Merged
dominicbarnes merged 2 commits into
masterfrom
load-no-clobber
Jul 14, 2020
Merged

dominicbarnes merged 2 commits into
masterfrom
load-no-clobber

Conversation

@dominicbarnes
Copy link
Copy Markdown
Owner

Currently, if you supply a struct/map with initial values prior to calling got.LoadTestData, those values will be lost as we simply create a new variable with that type before calling into json.Unmarshal.

This fixes that bug by carrying over any previous values before decoding as JSON.

@dominicbarnes
dominicbarnes merged commit 4903500 into master Jul 14, 2020
@dominicbarnes
dominicbarnes deleted the load-no-clobber branch July 14, 2020 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0