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

Fix README formatting for select descriptions #426

Merged
merged 1 commit into from May 30, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion README.md
Expand Up @@ -191,8 +191,11 @@ prompt := &survey.MultiSelect{..., PageSize: 10}

// or as an option to Ask or AskOne
survey.AskOne(prompt, &days, survey.WithPageSize(10))
```

#### Select options description

#### Select option's description
The optional description text can be used to add extra information to each option listed in the select prompt:

```golang
color := ""
Expand All @@ -207,6 +210,9 @@ prompt := &survey.Select{
},
}
survey.AskOne(prompt, &color)

// Assuming that the user chose "red - My favorite color":
fmt.Println(color) //=> "red"
```

### MultiSelect
Expand Down