command_win.go
This file
Path
command_win.go
27 lines · 452 bytes · Go
Last changed by
ci: test golang 1.16.x and 1.17.x too (#1425)Unai Martinez-Corralbefore adoption4fd30b6
History of this fileTake it
The walk stopped after 200 commits: lines older than 0ea93dd point at it.
ci: test golang 1.16.x and 1.17.x too (#1425)Unai Martinez-Corralbefore adoption4fd30b6
line 1why, one step back1//go:build windowsFixed linter issuesJuan Lenibefore adoption0ea93dd
lines 2–27why, one step back2// +build windows34package cobra56import (7 "fmt"8 "os"9 "time"1011 "github.com/inconshreveable/mousetrap"12)1314var preExecHookFn = preExecHook1516func preExecHook(c *Command) {17 if MousetrapHelpText != "" && mousetrap.StartedByExplorer() {18 c.Print(MousetrapHelpText)19 if MousetrapDisplayDuration > 0 {20 time.Sleep(MousetrapDisplayDuration)21 } else {22 c.Println("Press return to continue...")23 fmt.Scanln()24 }25 os.Exit(1)26 }27}