Former-commit-id: f8b47a578a5f03901d93df90235c9af6c1492617 [formerly f8b47a578a5f03901d93df90235c9af6c1492617 [formerly aacf8fcc1d3e51c71a2af1871f145127b1561231 [formerly 0dcfdb72be19a35e81531fee8f1cd7f9c7d09ec2]]]
Former-commit-id: 875bda075ff236145c59eeb128ec4f4eb8e93b58
Former-commit-id: 7f4444940943c5dbe04676f9f5d99cfebe6e1b43 [formerly 889e1711cfd6c40ab887c4e87d7bd58b35e2883c]
Former-commit-id: 711ca3276578c9da492d9c5a6243eb919579ae39
pull/15/head
Miguel Mota 6 years ago
parent 820fdca0cd
commit 63a1b53337

@ -1,19 +1,22 @@
package open package open
import ( import (
"log"
"os/exec" "os/exec"
"strings" "strings"
) )
var openCmd string var openCmd string
var possibleCmds = []string{ var possibleCmds = []string{
"xdg-open", // linux "gvfs-open", // gnome linux
"gvfs-open", // linux "gnome-open", // gnome linux
"gnome-open", // linux "kde-open", // kde linux
"kde-open", // linux "exo-open", // xfce linux
"open", // mac "enlightenment_open", // enlightenment linux
"start", // windows "xdg-open", // generic linux
"cygstart", // windows "open", // mac
"start", // windows
"cygstart", // windows
} }
func init() { func init() {
@ -28,6 +31,7 @@ func init() {
openCmd = possibleCmds[i] openCmd = possibleCmds[i]
} }
} }
log.Fatal("CMD ", openCmd)
} }
// URL open url // URL open url

Loading…
Cancel
Save