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
### Fixed
- Bug in select item
## v1.2.0 - 2019-09-01
### Added

View file

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