aboutsummaryrefslogtreecommitdiff
path: root/src/html
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@golang.org>2018-11-02 15:18:43 +0000
committerBrad Fitzpatrick <bradfitz@golang.org>2018-11-02 22:47:58 +0000
commit3813edf26edb78620632dc9c7d66096e5b2b5019 (patch)
tree7b61738f970909800472f3ab5d00e90ddd0d405e /src/html
parente25823edcea364df70b8db7462f53e7dac2b8fca (diff)
downloadgo-3813edf26edb78620632dc9c7d66096e5b2b5019.tar.gz
go-3813edf26edb78620632dc9c7d66096e5b2b5019.zip
all: use "reports whether" consistently in the few places that didn't
Go documentation style for boolean funcs is to say: // Foo reports whether ... func Foo() bool (rather than "returns true if") This CL also replaces 4 uses of "iff" with the same "reports whether" wording, which doesn't lose any meaning, and will prevent people from sending typo fixes when they don't realize it's "if and only if". In the past I think we've had the typo CLs updated to just say "reports whether". So do them all at once. (Inspired by the addition of another "returns true if" in CL 146938 in fd_plan9.go) Created with: $ perl -i -npe 's/returns true if/reports whether/' $(git grep -l "returns true iff" | grep -v vendor) $ perl -i -npe 's/returns true if/reports whether/' $(git grep -l "returns true if" | grep -v vendor) Change-Id: Ided502237f5ab0d25cb625dbab12529c361a8b9f Reviewed-on: https://go-review.googlesource.com/c/147037 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/html')
-rw-r--r--src/html/template/js.go2
-rw-r--r--src/html/template/url.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/html/template/js.go b/src/html/template/js.go
index 2291f47c33..98e821b73c 100644
--- a/src/html/template/js.go
+++ b/src/html/template/js.go
@@ -371,7 +371,7 @@ func isJSIdentPart(r rune) bool {
return false
}
-// isJSType returns true if the given MIME type should be considered JavaScript.
+// isJSType reports whether the given MIME type should be considered JavaScript.
//
// It is used to determine whether a script tag with a type attribute is a javascript container.
func isJSType(mimeType string) bool {
diff --git a/src/html/template/url.go b/src/html/template/url.go
index 8a4f727e50..6f8185a4e9 100644
--- a/src/html/template/url.go
+++ b/src/html/template/url.go
@@ -86,7 +86,7 @@ func urlProcessor(norm bool, args ...interface{}) string {
}
// processURLOnto appends a normalized URL corresponding to its input to b
-// and returns true if the appended content differs from s.
+// and reports whether the appended content differs from s.
func processURLOnto(s string, norm bool, b *bytes.Buffer) bool {
b.Grow(len(s) + 16)
written := 0