fcee603081
Previously if the only names defined by _test packages were examples, the gotest script would emit an incorrect _testmain.go file. I worked around that by marking the example_test.go files +build ignored. This CL changes the gotest script to handle this case correctly, and removes the now-unnecessary build tags. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/214039 From-SVN: r280085
23 lines
619 B
Go
23 lines
619 B
Go
// Copyright 2015 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package html_test
|
|
|
|
import (
|
|
"fmt"
|
|
"html"
|
|
)
|
|
|
|
func ExampleEscapeString() {
|
|
const s = `"Fran & Freddie's Diner" <tasty@example.com>`
|
|
fmt.Println(html.EscapeString(s))
|
|
// Output: "Fran & Freddie's Diner" <tasty@example.com>
|
|
}
|
|
|
|
func ExampleUnescapeString() {
|
|
const s = `"Fran & Freddie's Diner" <tasty@example.com>`
|
|
fmt.Println(html.UnescapeString(s))
|
|
// Output: "Fran & Freddie's Diner" <tasty@example.com>
|
|
}
|