Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add helpers for slice of Map #102

Merged
merged 2 commits into from Feb 8, 2021
Merged

Add helpers for slice of Map #102

merged 2 commits into from Feb 8, 2021

Conversation

vyskocilm
Copy link
Contributor

Summary

objx can't work with JSON documents starting with top-level array. This
commit adds helpers FromJSONSlice and MustJSONSlice. Those returns []Map
enabling objx usage for this case as well.

Checklist

[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

  • Tests are passing: task test
  • Code style is correct: task lint

objx can't work with JSON documents starting with top-level array. This
commit adds helpers FromJSONSlice and MustJSONSlice. Those returns `[]Map`
enabling objx usage for this case as well.
Copy link
Collaborator

@geseq geseq left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. LGTM other than a small change.

map.go Show resolved Hide resolved
@geseq
Copy link
Collaborator

geseq commented Feb 4, 2021

cc @hanzei

@hanzei hanzei merged commit 6c797d8 into stretchr:master Feb 8, 2021
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.

None yet

3 participants