Move code that was just for printing the Menu to different private function
This commit is contained in:
parent
6cd080fc72
commit
37b00556e7
|
@ -208,8 +208,7 @@ func (m *Menu) handleInput(input string) {
|
|||
}
|
||||
}
|
||||
|
||||
func (m *Menu) iteration() {
|
||||
m.Log.Flush()
|
||||
func (m *Menu) printMenu() {
|
||||
fmt.Printf("%s\n", m.Title)
|
||||
m.lineCounter++
|
||||
path := ""
|
||||
|
@ -235,6 +234,11 @@ func (m *Menu) iteration() {
|
|||
fmt.Printf("%s: Go back one layer\n", m.BackKey)
|
||||
m.lineCounter++
|
||||
}
|
||||
}
|
||||
|
||||
func (m *Menu) iteration() {
|
||||
m.Log.Flush()
|
||||
m.printMenu()
|
||||
stdinReader := bufio.NewReader(os.Stdin)
|
||||
msg, err := stdinReader.ReadString('\n')
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue
Block a user