fix: new line with clear input
This commit is contained in:
parent
dcbb7359ee
commit
0cdfe3c615
2 changed files with 1 additions and 1 deletions
|
@ -16,6 +16,7 @@ Which is based on [Keep A Changelog](http://keepachangelog.com/)
|
||||||
## Changed
|
## Changed
|
||||||
|
|
||||||
- Prefix error message with ERROR
|
- Prefix error message with ERROR
|
||||||
|
- Fix new line with clear input
|
||||||
|
|
||||||
## v1.0.0 - 2019-07-12
|
## v1.0.0 - 2019-07-12
|
||||||
|
|
||||||
|
|
|
@ -112,7 +112,6 @@ func (c *Cli) input(text string, defaultValue string, show bool) string {
|
||||||
input := bufio.NewScanner(os.Stdin)
|
input := bufio.NewScanner(os.Stdin)
|
||||||
input.Scan()
|
input.Scan()
|
||||||
if input.Text() == "" {
|
if input.Text() == "" {
|
||||||
fmt.Printf("\n")
|
|
||||||
return defaultValue
|
return defaultValue
|
||||||
}
|
}
|
||||||
return input.Text()
|
return input.Text()
|
||||||
|
|
Loading…
Reference in a new issue