OSDN Git Service

Hulk did something
[bytom/vapor.git] / vendor / github.com / toqueteos / webbrowser / README.md
1 # webbrowser [![Build Status](https://travis-ci.org/toqueteos/webbrowser.png?branch=master)](https://travis-ci.org/toqueteos/webbrowser) [![GoDoc](http://godoc.org/github.com/toqueteos/webbrowser?status.png)](http://godoc.org/github.com/toqueteos/webbrowser)
2
3 webbrowser provides a simple API for opening web pages on your default browser.
4
5 It's inspired on [Python's webbrowser](http://docs.python.org/3/library/webbrowser.html) package but lacks some of its features (open new window).
6
7 It just opens a webpage, most browsers will open it on a new tab.
8
9 ## Installation
10
11 As simple as:
12
13 ```bash
14 go get -u github.com/toqueteos/webbrowser
15 ```
16
17 ## Usage
18
19 ```go
20 package main
21
22 import "github.com/toqueteos/webbrowser"
23
24 func main() {
25     webbrowser.Open("http://golang.org")
26 }
27 ```
28
29 That's it!
30
31 ## Crossplatform support
32
33 The package works on:
34
35 - [x] `android` (verified by 3rd party)
36 - [x] `darwin`
37 - [x] `freebsd` (verified by 3rd party)
38 - [x] `linux`
39 - [x] `netbsd` (verified by 3rd party)
40 - [x] `openbsd` (verified by 3rd party)
41 - [x] `windows`
42
43 ## License
44
45 It is licensed under the MIT open source license, please see the [LICENSE.md](https://github.com/toqueteos/webbrowser/blob/master/LICENSE.md) file for more information.
46
47 ## Thanks...
48
49 Miki Tebeka wrote a nicer version that wasn't on godoc.org when I did this, [check it out!](https://bitbucket.org/tebeka/go-wise/src/d8db9bf5c4d1/desktop.go?at=default).
50
51 ## Already disliking it?
52
53 No problem! There's alternative libraries that may be better to your needs:
54
55 - https://github.com/pkg/browser, it does what webbrowser does and more!
56 - https://github.com/skratchdot/open-golang, it even provides a `xdg-open` implementation in case you don't have it!