Vendor libraries for github.com/spf13/cobra

This commit is contained in:
Alexander Neumann 2016-12-30 20:42:05 +01:00 committed by Zlatko Čalušić
parent e945404183
commit 6bee34700d
77 changed files with 14150 additions and 4 deletions

26
vendor/github.com/spf13/cobra/command_win.go generated vendored Normal file
View file

@ -0,0 +1,26 @@
// +build windows
package cobra
import (
"os"
"time"
"github.com/inconshreveable/mousetrap"
)
var preExecHookFn = preExecHook
// enables an information splash screen on Windows if the CLI is started from explorer.exe.
var MousetrapHelpText string = `This is a command line tool
You need to open cmd.exe and run it from there.
`
func preExecHook(c *Command) {
if mousetrap.StartedByExplorer() {
c.Print(MousetrapHelpText)
time.Sleep(5 * time.Second)
os.Exit(1)
}
}