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

Expand is non-deterministic if there are parent-child elements #8

Open
alexec opened this issue Sep 22, 2021 · 0 comments
Open

Expand is non-deterministic if there are parent-child elements #8

alexec opened this issue Sep 22, 2021 · 0 comments

Comments

@alexec
Copy link

alexec commented Sep 22, 2021

Consider this:

m0 := map[string]interface{}{
				"a.b": 2,
				"a":   1,
			}
			m1 := Expand(m0)
			assert.Len(t, m0, 2, "original map unchanged")
			assert.Equal(t, map[string]interface{}{
				"a": map[string]interface{}{
					"b": 2,
				},
			}, m1)

What should the resulting map be? I think it is undefined?

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

No branches or pull requests

1 participant