INNER CODE UNIT · Go
selectProject
eko/monday · cmd/main.go:129
func selectProject(conf *config.Config) string {
projects := conf.GetProjectNames()
prompt := promptui.Select{
Label: "Which project do you want to work on?",
Items: projects,
Size: 20,
Templates: &promptui.SelectTemplates{
Label: "{{ . }} (type to filter)",
Active: "▸ {{ . | cyan | bold }}",
Inactive: " {{ . }}",
Selected: `⚡ Launching {{ . | cyan | bold }}...`,
},
Searcher: func(input string, index int) bool {
return strings.Contains(
strings.Replace(strings.ToLower(projects[index]), " ", "", -1),
strings.Replace(strings.ToLower(input), " ", "", -1),
)