Skip to content

Add helpers for slice of Map - #102

Merged
hanzei merged 2 commits into
stretchr:masterfrom
vyskocilm:master
Feb 8, 2021
Merged

hanzei merged 2 commits into
stretchr:masterfrom
vyskocilm:master

Conversation

@vyskocilm

Copy link
Copy Markdown
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.

@geseq geseq left a comment

Copy link
Copy Markdown
Collaborator

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.

Comment thread map.go
@geseq

geseq commented Feb 4, 2021

Copy link
Copy Markdown
Collaborator

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.

3 participants