erikgeiser / promptkit

Go prompt library
MIT License
249 stars 21 forks source link

Choices example not refactored #13

Closed jlec closed 2 years ago

jlec commented 2 years ago

Using this example

https://github.com/erikgeiser/promptkit/blob/1f33bc73d091f90faf118ee5ab5d85cb6474ca7c/examples/selection/main.go#L11

I get

example.go:70:43: cannot use []string{…} (value of type []string) as type []*selection.Choice in argument to selection.New
jlec commented 2 years ago

Interestingly it works as the standalone example, but when used in combination with cobra it fails.

EDIT: caused by using the latest release aka. 0.7.0

jlec commented 2 years ago

Ah, HEAD vs 0.7.0 release... f8cc53607aa3ee06bcfd6fde59597ba40603a4c2 is a breaking change