added vendor dir

This commit is contained in:
Derek McQuay
2017-01-24 18:27:39 -08:00
parent f5d1e2aca3
commit 9f98331c59
184 changed files with 43627 additions and 0 deletions
+26
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)
}
}