add package github.com/spf13/cobra

This commit is contained in:
fatedier
2018-04-23 02:35:50 +08:00
parent c1f57da00d
commit 4cb4da3afc
117 changed files with 19917 additions and 1 deletions

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

@ -0,0 +1,20 @@
// +build windows
package cobra
import (
"os"
"time"
"github.com/inconshreveable/mousetrap"
)
var preExecHookFn = preExecHook
func preExecHook(c *Command) {
if MousetrapHelpText != "" && mousetrap.StartedByExplorer() {
c.Print(MousetrapHelpText)
time.Sleep(5 * time.Second)
os.Exit(1)
}
}