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

Commit

Permalink
Fix README formatting for select descriptions (#426)
Browse files Browse the repository at this point in the history
  • Loading branch information
mislav authored May 30, 2022
1 parent c2be27f commit e47352f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
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

0 comments on commit e47352f

Please sign in to comment.