mirror of
https://github.com/git-chglog/git-chglog.git
synced 2026-01-23 02:15:12 +00:00
fix(init): support OptionAnswer form in survey/v2 (#113)
This commit is contained in:
parent
efa1c30c0a
commit
8713d96856
1 changed files with 5 additions and 2 deletions
|
|
@ -81,8 +81,11 @@ func (q *questionerImpl) ask() (*Answer, error) {
|
|||
tpls := q.getPreviewableList(templates)
|
||||
|
||||
var previewableTransform = func(ans interface{}) (newAns interface{}) {
|
||||
if s, ok := ans.(string); ok {
|
||||
newAns = q.parsePreviewableList(s)
|
||||
if s, ok := ans.(survey.OptionAnswer); ok {
|
||||
newAns = survey.OptionAnswer{
|
||||
Value: q.parsePreviewableList(s.Value),
|
||||
Index: s.Index,
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue