File tree 2 files changed +20
-3
lines changed
2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,17 @@ The choice of which browser is started is entirely client dependant.
10
10
11
11
12
12
13
+ ## Variables
14
+ ``` go
15
+ var Stderr io.Writer = os.Stderr
16
+ ```
17
+ Stderr is the io.Writer to which executed commands write standard error.
18
+
19
+ ``` go
20
+ var Stdout io.Writer = os.Stdout
21
+ ```
22
+ Stdout is the io.Writer to which executed commands write standard output.
23
+
13
24
14
25
## func OpenFile
15
26
``` go
@@ -41,4 +52,4 @@ OpenURL opens a new browser window pointing to url.
41
52
42
53
43
54
- - -
44
- Generated by [godoc2md](http:// godoc.org/github.com/davecheney/godoc2md)
55
+ Generated by [godoc2md](http:// godoc.org/github.com/davecheney/godoc2md)
Original file line number Diff line number Diff line change @@ -12,6 +12,12 @@ import (
12
12
"path/filepath"
13
13
)
14
14
15
+ // Stdout is the io.Writer to which executed commands write standard output.
16
+ var Stdout io.Writer = os .Stdout
17
+
18
+ // Stderr is the io.Writer to which executed commands write standard error.
19
+ var Stderr io.Writer = os .Stderr
20
+
15
21
// OpenFile opens new browser window for the file path.
16
22
func OpenFile (path string ) error {
17
23
path , err := filepath .Abs (path )
@@ -50,7 +56,7 @@ func OpenURL(url string) error {
50
56
51
57
func runCmd (prog string , args ... string ) error {
52
58
cmd := exec .Command (prog , args ... )
53
- cmd .Stdout = os . Stdout
54
- cmd .Stderr = os . Stderr
59
+ cmd .Stdout = Stdout
60
+ cmd .Stderr = Stderr
55
61
return cmd .Run ()
56
62
}
You can’t perform that action at this time.
0 commit comments