aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/skratchdot/open-golang/open/open.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-07-16 23:20:23 +0200
committerMichael Muré <batolettre@gmail.com>2018-07-16 23:23:43 +0200
commit1d678dfdfa026968dbb19795c9bed16385603b21 (patch)
treecac862609d0103ee30da39cd0054b11884248e9d /vendor/github.com/skratchdot/open-golang/open/open.go
parent131a862d313f12808d63e832126317a27226940b (diff)
downloadgit-bug-1d678dfdfa026968dbb19795c9bed16385603b21.tar.gz
vendor dependencies with dep
Diffstat (limited to 'vendor/github.com/skratchdot/open-golang/open/open.go')
-rw-r--r--vendor/github.com/skratchdot/open-golang/open/open.go50
1 files changed, 50 insertions, 0 deletions
diff --git a/vendor/github.com/skratchdot/open-golang/open/open.go b/vendor/github.com/skratchdot/open-golang/open/open.go
new file mode 100644
index 00000000..b1f648ff
--- /dev/null
+++ b/vendor/github.com/skratchdot/open-golang/open/open.go
@@ -0,0 +1,50 @@
+/*
+
+ 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()
+}