Add case for pressing ESC
This commit is contained in:
parent
47340a3c2e
commit
ff7a4e846f
2 changed files with 9 additions and 0 deletions
|
@ -71,6 +71,11 @@ func viewGPU(id string, ext ...int) {
|
||||||
|
|
||||||
// Parse the choice
|
// Parse the choice
|
||||||
switch choice {
|
switch choice {
|
||||||
|
case "":
|
||||||
|
// If ESC is pressed
|
||||||
|
fmt.Println("")
|
||||||
|
os.Exit(0)
|
||||||
|
|
||||||
case "ext":
|
case "ext":
|
||||||
// Run an extended relative search
|
// Run an extended relative search
|
||||||
viewGPU(id, 1)
|
viewGPU(id, 1)
|
||||||
|
|
|
@ -72,6 +72,10 @@ func viewUSB(id string, ext ...int) {
|
||||||
|
|
||||||
// Parse the choice
|
// Parse the choice
|
||||||
switch choice {
|
switch choice {
|
||||||
|
case "":
|
||||||
|
// If ESC is pressed
|
||||||
|
fmt.Println("")
|
||||||
|
os.Exit(0)
|
||||||
case "n":
|
case "n":
|
||||||
// Go back to selecting a gpu
|
// Go back to selecting a gpu
|
||||||
selectUSB()
|
selectUSB()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue