From dc58c8f433c2ed2304866c4a44cd65f6c34456f6 Mon Sep 17 00:00:00 2001 From: Dave Cheney Date: Thu, 10 Jul 2014 17:18:52 +1000 Subject: initial import --- example_test.go | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 example_test.go (limited to 'example_test.go') 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) +} -- cgit v1.2.3