Skip to content

Support map[string]config{} by creating a ptr to the config value#10

Merged
LukasJenicek merged 3 commits intomasterfrom
Add-test-for-mapstringConfig
Oct 10, 2024
Merged

Support map[string]config{} by creating a ptr to the config value#10
LukasJenicek merged 3 commits intomasterfrom
Add-test-for-mapstringConfig

Conversation

@VojtechVitek
Copy link
Copy Markdown
Contributor

@VojtechVitek VojtechVitek commented Oct 10, 2024

A limitation of a map[string]struct{} is that we can't directly set struct's fields using reflect's .SetValue(). We need to create a pointer to the value first, update the field and then reassign the map with the new struct value.

@LukasJenicek LukasJenicek merged commit ebefdc2 into master Oct 10, 2024
@LukasJenicek LukasJenicek deleted the Add-test-for-mapstringConfig branch October 10, 2024 13:44
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.

2 participants