File: example_test.go

package info (click to toggle)
golang-github-pkg-browser 0.0~git20240102.5ac0b6a-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 116 kB
  • sloc: makefile: 5
file content (23 lines) | stat: -rw-r--r-- 661 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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)
}