aboutsummaryrefslogtreecommitdiff
path: root/lib/open_darwin.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib/open_darwin.go')
-rw-r--r--lib/open_darwin.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/open_darwin.go b/lib/open_darwin.go
new file mode 100644
index 0000000..0ffd9a1
--- /dev/null
+++ b/lib/open_darwin.go
@@ -0,0 +1,10 @@
+package lib
+
+import (
+ "os/exec"
+)
+
+func OpenFile(filename string) error {
+ cmd := exec.Command("open", filename)
+ return cmd.Run()
+}