aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/text
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2013-07-23 11:59:49 +1000
committerRob Pike <r@golang.org>2013-07-23 11:59:49 +1000
commitabe384f68a8572e94acea0f3966cc72cbedd9c29 (patch)
treec4412e9a033536d062a86a234e26b1e80d9aada0 /src/pkg/text
parent7d9a8fb8a913c21599959cd2cea3496ae0828bdc (diff)
downloadgo-abe384f68a8572e94acea0f3966cc72cbedd9c29.tar.xz
all: be more idiomatic when documenting boolean return values.
Phrases like "returns whether or not the image is opaque" could be describing what the function does (it always returns, regardless of the opacity) or what it returns (a boolean indicating the opacity). Even when the "or not" is missing, the phrasing is bizarre. Go with "reports whether", which is still clunky but at least makes it clear we're talking about the return value. These were edited by hand. A few were cleaned up in other ways. R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/11699043
Diffstat (limited to 'src/pkg/text')
-rw-r--r--src/pkg/text/template/exec.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/text/template/exec.go b/src/pkg/text/template/exec.go
index 8ec8174a16..b227a3534f 100644
--- a/src/pkg/text/template/exec.go
+++ b/src/pkg/text/template/exec.go
@@ -201,7 +201,7 @@ func (s *state) walkIfOrWith(typ parse.NodeType, dot reflect.Value, pipe *parse.
}
}
-// isTrue returns whether the value is 'true', in the sense of not the zero of its type,
+// isTrue reports whether the value is 'true', in the sense of not the zero of its type,
// and whether the value has a meaningful truth value.
func isTrue(val reflect.Value) (truth, ok bool) {
if !val.IsValid() {