Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Write OptionAnswer value to non interface{} map #293

Merged
merged 3 commits into from
Aug 10, 2020
Merged

Write OptionAnswer value to non interface{} map #293

merged 3 commits into from
Aug 10, 2020

Conversation

infalmo
Copy link
Contributor

@infalmo infalmo commented Jul 9, 2020

Hello!
Basically, the commit enables to write just the string value (or index) of an option selected in survey.Select{} to a map of strings/ints. This is achieved by passing a map[string]string or map[string]int instead of map[string]interface{} .

Also, thanks a lot for this wonderful package!

@infalmo
Copy link
Contributor Author

infalmo commented Aug 2, 2020

@coryb @AlecAivazis Could you please review this PR, and suggest changes if any?

@AlecAivazis
Copy link
Owner

Hey @infixint943! Would you mind writing a test that covers this change? I am having a hard time following the exact situation you are trying to address.

@infalmo
Copy link
Contributor Author

infalmo commented Aug 3, 2020

@AlecAivazis I have added tests.
I would be very thankful if you reviewed them!

@infalmo
Copy link
Contributor Author

infalmo commented Aug 7, 2020

Any updates @AlecAivazis?

@AlecAivazis AlecAivazis merged commit dbdb3e5 into AlecAivazis:master Aug 10, 2020
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants