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 · 3 comments
Closed

Merge Params with dictionary #6633

xv-andrii-h opened this issue Dec 18, 2019 · 3 comments
Milestone

Comments

@xv-andrii-h
Copy link

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
Copy link
Member

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 as completed in 1b785a7 Dec 18, 2019
@xv-andrii-h
Copy link
Author

@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
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants