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

Support root level map keys in map sources #2047

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lukasbindreiter
Copy link

What type of PR is this?

  • bug

What this PR does / why we need it:

It fixes a bug in MapValueSource where lookup doesn't work for keys directly in the first level (root) of the map.

Which issue(s) this PR fixes:

Fixes #2037

Special notes for your reviewer:

The issue is related to this one I raised in cli-altsrc: urfave/cli-altsrc#14
I'll create a similar PR there as well.

Testing

I added a test case for this exact issue as well. It will fail without changes from the PR.
I also added another test case for the map[string]any special case that was in place in the code, to make sure that works to.

@lukasbindreiter
Copy link
Author

Related PR in cli-altsrc: urfave/cli-altsrc#16

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.

Support root level map keys in map sources
1 participant