Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
examples/Open/ | H | 16-Sep-2018 | - | |||
LICENSE | H A D | 16-Sep-2018 | 1.3 KiB | |||
README.md | H A D | 16-Sep-2018 | 930 | |||
browser.go | H A D | 16-Sep-2018 | 1.6 KiB | |||
browser_darwin.go | H A D | 16-Sep-2018 | 135 | |||
browser_linux.go | H A D | 16-Sep-2018 | 139 | |||
browser_openbsd.go | H A D | 16-Sep-2018 | 320 | |||
browser_unsupported.go | H A D | 16-Sep-2018 | 256 | |||
browser_windows.go | H A D | 16-Sep-2018 | 283 | |||
example_test.go | H A D | 16-Sep-2018 | 661 |
README.md
1 2# browser 3 import "github.com/pkg/browser" 4 5Package browser provides helpers to open files, readers, and urls in a browser window. 6 7The choice of which browser is started is entirely client dependant. 8 9 10 11 12 13## Variables 14``` go 15var Stderr io.Writer = os.Stderr 16``` 17Stderr is the io.Writer to which executed commands write standard error. 18 19``` go 20var Stdout io.Writer = os.Stdout 21``` 22Stdout is the io.Writer to which executed commands write standard output. 23 24 25## func OpenFile 26``` go 27func OpenFile(path string) error 28``` 29OpenFile opens new browser window for the file path. 30 31 32## func OpenReader 33``` go 34func OpenReader(r io.Reader) error 35``` 36OpenReader consumes the contents of r and presents the 37results in a new browser window. 38 39 40## func OpenURL 41``` go 42func OpenURL(url string) error 43``` 44OpenURL opens a new browser window pointing to url. 45 46 47 48 49 50 51 52 53 54- - - 55Generated by [godoc2md](http://godoc.org/github.com/davecheney/godoc2md) 56