From 1d4bb7ceb0cef79d68df0bacc913b01e40e6ddd6 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Wed, 5 Feb 2020 22:03:19 +0100 Subject: migrate to go modules --- .../github.com/skratchdot/open-golang/open/exec.go | 18 -------- .../skratchdot/open-golang/open/exec_darwin.go | 15 ------- .../skratchdot/open-golang/open/exec_windows.go | 33 -------------- .../github.com/skratchdot/open-golang/open/open.go | 50 ---------------------- 4 files changed, 116 deletions(-) delete mode 100644 vendor/github.com/skratchdot/open-golang/open/exec.go delete mode 100644 vendor/github.com/skratchdot/open-golang/open/exec_darwin.go delete mode 100644 vendor/github.com/skratchdot/open-golang/open/exec_windows.go delete mode 100644 vendor/github.com/skratchdot/open-golang/open/open.go (limited to 'vendor/github.com/skratchdot/open-golang/open') diff --git a/vendor/github.com/skratchdot/open-golang/open/exec.go b/vendor/github.com/skratchdot/open-golang/open/exec.go deleted file mode 100644 index 1b0e7136..00000000 --- a/vendor/github.com/skratchdot/open-golang/open/exec.go +++ /dev/null @@ -1,18 +0,0 @@ -// +build !windows,!darwin - -package open - -import ( - "os/exec" -) - -// http://sources.debian.net/src/xdg-utils/1.1.0~rc1%2Bgit20111210-7.1/scripts/xdg-open/ -// http://sources.debian.net/src/xdg-utils/1.1.0~rc1%2Bgit20111210-7.1/scripts/xdg-mime/ - -func open(input string) *exec.Cmd { - return exec.Command("xdg-open", input) -} - -func openWith(input string, appName string) *exec.Cmd { - return exec.Command(appName, input) -} diff --git a/vendor/github.com/skratchdot/open-golang/open/exec_darwin.go b/vendor/github.com/skratchdot/open-golang/open/exec_darwin.go deleted file mode 100644 index 16160e6f..00000000 --- a/vendor/github.com/skratchdot/open-golang/open/exec_darwin.go +++ /dev/null @@ -1,15 +0,0 @@ -// +build darwin - -package open - -import ( - "os/exec" -) - -func open(input string) *exec.Cmd { - return exec.Command("open", input) -} - -func openWith(input string, appName string) *exec.Cmd { - return exec.Command("open", "-a", appName, input) -} diff --git a/vendor/github.com/skratchdot/open-golang/open/exec_windows.go b/vendor/github.com/skratchdot/open-golang/open/exec_windows.go deleted file mode 100644 index 6e46c005..00000000 --- a/vendor/github.com/skratchdot/open-golang/open/exec_windows.go +++ /dev/null @@ -1,33 +0,0 @@ -// +build windows - -package open - -import ( - "os" - "os/exec" - "path/filepath" - "strings" - // "syscall" -) - -var ( - cmd = "url.dll,FileProtocolHandler" - runDll32 = filepath.Join(os.Getenv("SYSTEMROOT"), "System32", "rundll32.exe") -) - -func cleaninput(input string) string { - r := strings.NewReplacer("&", "^&") - return r.Replace(input) -} - -func open(input string) *exec.Cmd { - cmd := exec.Command(runDll32, cmd, input) - //cmd.SysProcAttr = &syscall.SysProcAttr{HideWindow: true} - return cmd -} - -func openWith(input string, appName string) *exec.Cmd { - cmd := exec.Command("cmd", "/C", "start", "", appName, cleaninput(input)) - //cmd.SysProcAttr = &syscall.SysProcAttr{HideWindow: true} - return cmd -} diff --git a/vendor/github.com/skratchdot/open-golang/open/open.go b/vendor/github.com/skratchdot/open-golang/open/open.go deleted file mode 100644 index b1f648ff..00000000 --- a/vendor/github.com/skratchdot/open-golang/open/open.go +++ /dev/null @@ -1,50 +0,0 @@ -/* - - Open a file, directory, or URI using the OS's default - application for that object type. Optionally, you can - specify an application to use. - - This is a proxy for the following commands: - - OSX: "open" - Windows: "start" - Linux/Other: "xdg-open" - - This is a golang port of the node.js module: https://github.com/pwnall/node-open - -*/ -package open - -/* - Open a file, directory, or URI using the OS's default - application for that object type. Wait for the open - command to complete. -*/ -func Run(input string) error { - return open(input).Run() -} - -/* - Open a file, directory, or URI using the OS's default - application for that object type. Don't wait for the - open command to complete. -*/ -func Start(input string) error { - return open(input).Start() -} - -/* - Open a file, directory, or URI using the specified application. - Wait for the open command to complete. -*/ -func RunWith(input string, appName string) error { - return openWith(input, appName).Run() -} - -/* - Open a file, directory, or URI using the specified application. - Don't wait for the open command to complete. -*/ -func StartWith(input string, appName string) error { - return openWith(input, appName).Start() -} -- cgit