Closed brenley closed 3 years ago
Hey @brenley!
Let me start by admitting this part of the API is slightly confusing. The issue you are running into is caused by your return value in Transform
. The Transform
of a Select
prompt can return string
, int
, or survey.OptionAnswer
.
Unfortunately, this forces you to serialize and deserialize the struct you want but at the moment that's how things are structured. For more information on this you can see #105
Using
Transform
option withSelect
and returning another interface causes Cleanup to panic.e.g. given:
https://github.com/AlecAivazis/survey/blob/e64d9b644fb7d85d69cd3e33a92a43ee706c1b6f/select.go#L323