mirror of
https://github.com/aykhans/dodo.git
synced 2025-04-20 19:13:06 +00:00
🔨 add CLI yes or no reader to confirm starting Dodo
This commit is contained in:
parent
b7ac3bc549
commit
c2ce8e587b
6
main.go
6
main.go
@ -81,6 +81,12 @@ func main() {
|
|||||||
Body: jsonConf.Body,
|
Body: jsonConf.Body,
|
||||||
}
|
}
|
||||||
dodoConf.Print()
|
dodoConf.Print()
|
||||||
|
response := readers.CLIYesOrNoReader("Do you want to continue?", true)
|
||||||
|
if response {
|
||||||
|
utils.PrintlnC(utils.Colors.Green, "Starting Dodo\n")
|
||||||
|
} else {
|
||||||
|
utils.PrintAndExit("Exiting...")
|
||||||
|
}
|
||||||
|
|
||||||
ctx, cancel := context.WithCancel(context.Background())
|
ctx, cancel := context.WithCancel(context.Background())
|
||||||
sigChan := make(chan os.Signal, 1)
|
sigChan := make(chan os.Signal, 1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user