AlecAivazis / survey

A golang library for building interactive and accessible prompts with full support for windows and posix terminals.
MIT License
4.08k stars 351 forks source link

Using custom struct for multi select #311

Closed michaeldcanady closed 3 years ago

michaeldcanady commented 3 years ago

I am trying to create a multiselect with a custom struct of:

type user struct{
  path string
  size int64
}

Is this possible?

AlecAivazis commented 3 years ago

Hey @michaeldcanady - unfortunately this is not supported. You will have to get a string from the prompt and then figure out which of your custom structs it is reeferencing.

Lemme know if you have more questions!