Use "open" instead of "xdg-open" on Darwin systems
This commit is contained in:
parent
687f1d8c1a
commit
1bb1a80156
4 changed files with 25 additions and 4 deletions
lib
12
lib/open.go
Normal file
12
lib/open.go
Normal file
|
@ -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()
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue