fix: bug in select item
This commit is contained in:
parent
b066a34a45
commit
45aecb7a66
2 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue