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

Merge Params with dictionary #6633

Closed
xv-andrii-h opened this issue Dec 18, 2019 · 2 comments
Closed

Merge Params with dictionary #6633

xv-andrii-h opened this issue Dec 18, 2019 · 2 comments
Labels
Bug
Milestone

Comments

@xv-andrii-h
Copy link

@xv-andrii-h xv-andrii-h commented Dec 18, 2019

Starting from version 0.60.0 Params (page, site, etc.) were changed from map[string]interface{} to Params type. This means that we can not merge them with dictionary produced by dict function:

error calling merge: incompatible map types, got maps.Params to map[string]interface {}

Maybe it makes sense to update dict function to return Params type too?

@bep bep added Bug and removed Proposal labels Dec 18, 2019
@bep bep added this to the v0.62 milestone Dec 18, 2019
@bep

This comment has been minimized.

Copy link
Member

@bep bep commented Dec 18, 2019

Maybe it makes sense to update dict function to return Params type too?

No, that would not make sens. maps.Params is lower-case string keys only. But merge should handle it.

@bep bep closed this in 1b785a7 Dec 18, 2019
@xv-andrii-h

This comment has been minimized.

Copy link
Author

@xv-andrii-h xv-andrii-h commented Dec 19, 2019

@bep Thank you, such fix is also fine :)

bep added a commit to bep/hugo that referenced this issue Dec 19, 2019
* If the end result is maps.Params, we need to lower the keys
* Also make sure to handle nested maps of different type

Update gohugoio#6633
bep added a commit that referenced this issue Dec 19, 2019
* If the end result is maps.Params, we need to lower the keys
* Also make sure to handle nested maps of different type

Update #6633
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.