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