-
Notifications
You must be signed in to change notification settings - Fork 436
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
Array strings #180
base: master
Are you sure you want to change the base?
Array strings #180
Conversation
PTAL |
PTAL. |
Hello, Is there anything I can do to help get this PR merged? |
PTAL |
any update here? I am using a fork with the above patch, would love to remove a replace directive from my go.mod if possible. The code looks solid and I have tested it a ton. |
Do we know why this is left open? Seems that it would be a fix for this: grafana/loki#9179 |
@buger Hello, can you have a look at this fix? Thanks in advance |
Hello, any news? |
@buger This PR being now almost 5 years old, I'm making one last check to see if you have any interest in merging it; if not, I'll transition our code to using my fork. Thank you! |
Description:
In master, EachKey cannot extract from an array of strings. Specifying
foo.[0]
would return nothing for{"foo": ["a","b"]}
, because EachKey calls the Get function twice and in the case of strings inside arrays, the first Get strips quotes and the second then cannot recognize that it has been passed a string.This PR appears to make extraction from arrays of strings work properly without breaking any existing tests. It includes a test which failed on master but passes with the changes.
Benchmark before change: Neither benchmark worked: