fix: bug in select item

This commit is contained in:
Adrien Waksberg 2019-10-19 08:24:44 +02:00
parent b066a34a45
commit 45aecb7a66
2 changed files with 5 additions and 1 deletions

View file

@ -7,6 +7,10 @@ Which is based on [Keep A Changelog](http://keepachangelog.com/)
## Unreleased ## Unreleased
### Fixed
- Bug in select item
## v1.2.0 - 2019-09-01 ## v1.2.0 - 2019-09-01
### Added ### Added

View file

@ -118,11 +118,11 @@ func (c *Cli) selectEntry() Entry {
for true { for true {
index, err := strconv.Atoi(c.input("Select the entry: ", "", true)) index, err := strconv.Atoi(c.input("Select the entry: ", "", true))
if err == nil && index >= 0 && index+1 <= max { if err == nil && index >= 0 && index+1 <= max {
c1 <- index
break break
} }
fmt.Println("your choice is not an integer or is out of range") fmt.Println("your choice is not an integer or is out of range")
} }
c1 <- index
}(len(entries)) }(len(entries))
select { select {