From ca5dee2467d7af7f3e9a794544a80218f3a67b6a Mon Sep 17 00:00:00 2001 From: kolaente Date: Wed, 16 Sep 2020 20:47:51 +0200 Subject: [PATCH] Don't close the cmd promt right away on windows --- main.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.go b/main.go index c62984a..15fc241 100644 --- a/main.go +++ b/main.go @@ -9,6 +9,7 @@ import ( "os" "path" "path/filepath" + "runtime" "strings" ) @@ -80,4 +81,9 @@ func main() { // 4. Done fmt.Println("Done!") + + if runtime.GOOS == "windows" { + fmt.Println("Press enter to close this window...") + _, _ = readText() + } }