aboutsummaryrefslogtreecommitdiffstats
path: root/example_test.go
diff options
context:
space:
mode:
authorDave Cheney2014-07-10 17:18:52 +1000
committerDave Cheney2014-07-10 17:18:52 +1000
commitdc58c8f433c2ed2304866c4a44cd65f6c34456f6 (patch)
treea2d4e9546168c1c5c1d6cdb86a8a57bfc8b183ad /example_test.go
parentf87def9a79c9ed6b95eaf5f74f83bc5e68397709 (diff)
downloadbrowser-dc58c8f433c2ed2304866c4a44cd65f6c34456f6.tar.bz2
initial import
Diffstat (limited to 'example_test.go')
-rw-r--r--example_test.go23
1 files changed, 23 insertions, 0 deletions
diff --git a/example_test.go b/example_test.go
new file mode 100644
index 0000000..0c1fd3f
--- /dev/null
+++ b/example_test.go
@@ -0,0 +1,23 @@
+package browser
+
+import "strings"
+
+func ExampleOpenFile() {
+ OpenFile("index.html")
+}
+
+func ExampleOpenReader() {
+ // https://github.com/rust-lang/rust/issues/13871
+ const quote = `There was a night when winds from unknown spaces whirled us irresistibly into
+limitless vacum beyond all thought and entity. Perceptions of the most
+maddeningly untransmissible sort thronged upon us; perceptions of infinity
+which at the time convulsed us with joy, yet which are now partly lost to my
+memory and partly incapable of presentation to others.`
+ r := strings.NewReader(quote)
+ OpenReader(r)
+}
+
+func ExampleOpenURL() {
+ const url = "http://golang.org/"
+ OpenURL(url)
+}