getOpenCommand tries to guess command to open image for OS
()
| 102 | |
| 103 | // getOpenCommand tries to guess command to open image for OS |
| 104 | func getOpenCommand() string { |
| 105 | switch runtime.GOOS { |
| 106 | case "darwin": |
| 107 | return "/usr/bin/open" |
| 108 | case "windows": |
| 109 | return "cmd /c start" |
| 110 | default: |
| 111 | return "xdg-open" |
| 112 | } |
| 113 | } |
| 114 | |
| 115 | func makeCmdGraph() *commander.Command { |
| 116 | cmd := &commander.Command{ |