]> Cypherpunks repositories - gostls13.git/commitdiff
all: use "reports whether" in place of "returns true if(f)"
authorJosh Bleecher Snyder <josharian@gmail.com>
Tue, 17 Feb 2015 23:44:42 +0000 (15:44 -0800)
committerJosh Bleecher Snyder <josharian@gmail.com>
Wed, 18 Mar 2015 15:14:06 +0000 (15:14 +0000)
Comment changes only.

Change-Id: I56848814564c4aa0988b451df18bebdfc88d6d94
Reviewed-on: https://go-review.googlesource.com/7721
Reviewed-by: Rob Pike <r@golang.org>
47 files changed:
src/archive/zip/struct.go
src/cmd/cgo/gcc.go
src/cmd/cgo/main.go
src/cmd/cgo/util.go
src/cmd/fix/fix.go
src/cmd/go/pkg.go
src/cmd/gofmt/rewrite.go
src/crypto/elliptic/elliptic.go
src/crypto/hmac/hmac.go
src/crypto/tls/handshake_server.go
src/crypto/x509/cert_pool.go
src/encoding/asn1/asn1.go
src/encoding/csv/writer.go
src/flag/flag.go
src/go/ast/filter.go
src/go/build/build.go
src/go/doc/exports.go
src/go/parser/parser.go
src/go/printer/printer.go
src/go/printer/testdata/parser.go
src/go/token/position.go
src/math/big/nat.go
src/math/big/rat.go
src/mime/grammar.go
src/net/http/server.go
src/net/http/transport.go
src/net/ip.go
src/net/mail/message.go
src/net/url/url.go
src/os/path_plan9.go
src/os/path_unix.go
src/os/path_windows.go
src/path/filepath/match.go
src/path/filepath/path_plan9.go
src/path/filepath/path_unix.go
src/path/filepath/path_windows.go
src/path/match.go
src/path/path.go
src/reflect/type.go
src/reflect/value.go
src/regexp/syntax/prog.go
src/runtime/traceback.go
src/strconv/extfloat.go
src/strings/strings.go
src/text/scanner/scanner.go
src/time/format.go
src/unicode/utf16/utf16.go

index cb28e8324235544fa89130fd3a96f2af1a3837e1..793d5da48de067e6a710c614964282be6d724d54 100644 (file)
@@ -233,7 +233,7 @@ func (h *FileHeader) SetMode(mode os.FileMode) {
        }
 }
 
-// isZip64 returns true if the file size exceeds the 32 bit limit
+// isZip64 reports whether the file size exceeds the 32 bit limit
 func (fh *FileHeader) isZip64() bool {
        return fh.CompressedSize64 > uint32max || fh.UncompressedSize64 > uint32max
 }
index 4bc4d794c848b2b78306c4cfbd0f6489b047c27b..3ec753f55eef7370ea5da7cd7e858ad23b5247b3 100644 (file)
@@ -1042,7 +1042,7 @@ func (tr *TypeRepr) String() string {
        return fmt.Sprintf(tr.Repr, tr.FormatArgs...)
 }
 
-// Empty returns true if the result of String would be "".
+// Empty reports whether the result of String would be "".
 func (tr *TypeRepr) Empty() bool {
        return len(tr.Repr) == 0
 }
index 013fed37465e56acaf76eeeeb8605fb5523d3da5..41abb2c672c35706ee10b69e9872516a44bb7dba 100644 (file)
@@ -87,7 +87,7 @@ type Name struct {
        Const    string // constant definition
 }
 
-// IsVar returns true if Kind is either "var" or "fpvar"
+// IsVar reports whether Kind is either "var" or "fpvar"
 func (n *Name) IsVar() bool {
        return n.Kind == "var" || n.Kind == "fpvar"
 }
index 4e7800d12722148525f6811825dc460b23361cc2..3adb8e87836c21adc289b70711ebfbb326370b81 100644 (file)
@@ -55,7 +55,7 @@ func error_(pos token.Pos, msg string, args ...interface{}) {
        fmt.Fprintf(os.Stderr, "\n")
 }
 
-// isName returns true if s is a valid C identifier
+// isName reports whether s is a valid C identifier
 func isName(s string) bool {
        for i, v := range s {
                if v != '_' && (v < 'A' || v > 'Z') && (v < 'a' || v > 'z') && (v < '0' || v > '9') {
index a07bbac7902c073d25058b9b0d81f5d868815543..160336cdbd004ff83c52e8cf552e7cd56aef3300 100644 (file)
@@ -282,7 +282,7 @@ func walkBeforeAfter(x interface{}, before, after func(interface{})) {
        after(x)
 }
 
-// imports returns true if f imports path.
+// imports reports whether f imports path.
 func imports(f *ast.File, path string) bool {
        return importSpec(f, path) != nil
 }
@@ -322,33 +322,33 @@ func declImports(gen *ast.GenDecl, path string) bool {
        return false
 }
 
-// isPkgDot returns true if t is the expression "pkg.name"
+// isPkgDot reports whether t is the expression "pkg.name"
 // where pkg is an imported identifier.
 func isPkgDot(t ast.Expr, pkg, name string) bool {
        sel, ok := t.(*ast.SelectorExpr)
        return ok && isTopName(sel.X, pkg) && sel.Sel.String() == name
 }
 
-// isPtrPkgDot returns true if f is the expression "*pkg.name"
+// isPtrPkgDot reports whether f is the expression "*pkg.name"
 // where pkg is an imported identifier.
 func isPtrPkgDot(t ast.Expr, pkg, name string) bool {
        ptr, ok := t.(*ast.StarExpr)
        return ok && isPkgDot(ptr.X, pkg, name)
 }
 
-// isTopName returns true if n is a top-level unresolved identifier with the given name.
+// isTopName reports whether n is a top-level unresolved identifier with the given name.
 func isTopName(n ast.Expr, name string) bool {
        id, ok := n.(*ast.Ident)
        return ok && id.Name == name && id.Obj == nil
 }
 
-// isName returns true if n is an identifier with the given name.
+// isName reports whether n is an identifier with the given name.
 func isName(n ast.Expr, name string) bool {
        id, ok := n.(*ast.Ident)
        return ok && id.String() == name
 }
 
-// isCall returns true if t is a call to pkg.name.
+// isCall reports whether t is a call to pkg.name.
 func isCall(t ast.Expr, pkg, name string) bool {
        call, ok := t.(*ast.CallExpr)
        return ok && isPkgDot(call.Fun, pkg, name)
@@ -360,7 +360,7 @@ func isIdent(n interface{}) *ast.Ident {
        return id
 }
 
-// refersTo returns true if n is a reference to the same object as x.
+// refersTo reports whether n is a reference to the same object as x.
 func refersTo(n ast.Node, x *ast.Ident) bool {
        id, ok := n.(*ast.Ident)
        // The test of id.Name == x.Name handles top-level unresolved
@@ -368,12 +368,12 @@ func refersTo(n ast.Node, x *ast.Ident) bool {
        return ok && id.Obj == x.Obj && id.Name == x.Name
 }
 
-// isBlank returns true if n is the blank identifier.
+// isBlank reports whether n is the blank identifier.
 func isBlank(n ast.Expr) bool {
        return isName(n, "_")
 }
 
-// isEmptyString returns true if n is an empty string literal.
+// isEmptyString reports whether n is an empty string literal.
 func isEmptyString(n ast.Expr) bool {
        lit, ok := n.(*ast.BasicLit)
        return ok && lit.Kind == token.STRING && len(lit.Value) == 2
@@ -430,7 +430,7 @@ func rewriteUses(x *ast.Ident, f, fnot func(token.Pos) ast.Expr, scope []ast.Stm
        }
 }
 
-// assignsTo returns true if any of the code in scope assigns to or takes the address of x.
+// assignsTo reports whether any of the code in scope assigns to or takes the address of x.
 func assignsTo(x *ast.Ident, scope []ast.Stmt) bool {
        assigned := false
        ff := func(n interface{}) {
index 9b2e44c61bbb8a8bcad8fa7d3c78623a151302ae..6c157932fbab95df796212e5633481f0bbde6456 100644 (file)
@@ -176,7 +176,7 @@ func (s *importStack) copy() []string {
        return append([]string{}, *s...)
 }
 
-// shorterThan returns true if sp is shorter than t.
+// shorterThan reports whether sp is shorter than t.
 // We use this to record the shortest import sequence
 // that leads to a particular package.
 func (sp *importStack) shorterThan(t []string) bool {
index d267cfcc1dc69de69c51bb82e790e9a3ce4c786d..069f96622caf712a58f9dd7f08d1b3c6e4c0e281 100644 (file)
@@ -154,7 +154,7 @@ func isWildcard(s string) bool {
        return size == len(s) && unicode.IsLower(rune)
 }
 
-// match returns true if pattern matches val,
+// match reports whether pattern matches val,
 // recording wildcard submatches in m.
 // If m == nil, match checks whether pattern == val.
 func match(m map[string]reflect.Value, pattern, val reflect.Value) bool {
index fa987acf0bf359b80dd8193bda05a75afa194ec0..396bb5caf5157fb5f76bd60245ba206277d5705b 100644 (file)
@@ -24,7 +24,7 @@ import (
 type Curve interface {
        // Params returns the parameters for the curve.
        Params() *CurveParams
-       // IsOnCurve returns true if the given (x,y) lies on the curve.
+       // IsOnCurve reports whether the given (x,y) lies on the curve.
        IsOnCurve(x, y *big.Int) bool
        // Add returns the sum of (x1,y1) and (x2,y2)
        Add(x1, y1, x2, y2 *big.Int) (x, y *big.Int)
index b6f4919a7ce45e888d20fa3c77c1ca207ac3036c..e0cc1d6d2241331c02f2fd489e4c5efff5fb2c52 100644 (file)
@@ -11,7 +11,7 @@ The receiver verifies the hash by recomputing it using the same key.
 Receivers should be careful to use Equal to compare MACs in order to avoid
 timing side-channels:
 
-       // CheckMAC returns true if messageMAC is a valid HMAC tag for message.
+       // CheckMAC reports whether messageMAC is a valid HMAC tag for message.
        func CheckMAC(message, messageMAC, key []byte) bool {
                mac := hmac.New(sha256.New, key)
                mac.Write(message)
index 7675770ded2a4286760bd1c628396bc78035a3fe..c7c1f1e1f52d255318967f37f6523afc15e482ae 100644 (file)
@@ -238,7 +238,7 @@ Curves:
        return false, nil
 }
 
-// checkForResumption returns true if we should perform resumption on this connection.
+// checkForResumption reports whether we should perform resumption on this connection.
 func (hs *serverHandshakeState) checkForResumption() bool {
        c := hs.c
 
index babe94d41c553e4c5cbf2f395c2a7f5992dab08f..2362e84688d140179f5e77a0ef111056a13dc328 100644 (file)
@@ -77,7 +77,7 @@ func (s *CertPool) AddCert(cert *Certificate) {
 }
 
 // AppendCertsFromPEM attempts to parse a series of PEM encoded certificates.
-// It appends any certificates found to s and returns true if any certificates
+// It appends any certificates found to s and reports whether any certificates
 // were successfully parsed.
 //
 // On many Linux systems, /etc/ssl/cert.pem will contain the system wide set
index 8b3d1b34121c6cc78019806b2bbb76999a6912f5..aa99ca5cc5847417b7e6834e53bd44e805149729 100644 (file)
@@ -320,7 +320,7 @@ func parsePrintableString(bytes []byte) (ret string, err error) {
        return
 }
 
-// isPrintable returns true iff the given b is in the ASN.1 PrintableString set.
+// isPrintable reports whether the given b is in the ASN.1 PrintableString set.
 func isPrintable(b byte) bool {
        return 'a' <= b && b <= 'z' ||
                'A' <= b && b <= 'Z' ||
index 17e7bb7f5c79bf53f5693a36538d3f6efc1c695f..db2dc79a9e11b513542dcfa0f8cbb759db176940 100644 (file)
@@ -114,7 +114,7 @@ func (w *Writer) WriteAll(records [][]string) (err error) {
        return w.w.Flush()
 }
 
-// fieldNeedsQuotes returns true if our field must be enclosed in quotes.
+// fieldNeedsQuotes reports whether our field must be enclosed in quotes.
 // Fields with a Comma, fields with a quote or newline, and
 // fields which start with a space must be enclosed in quotes.
 // We used to quote empty strings, but we do not anymore (as of Go 1.4).
index 92bad794edef051ecdd942437cdf104bc86c2511..4e4279069f00923e04fa306547f5ee3f6c589a25 100644 (file)
@@ -923,7 +923,7 @@ func Parse() {
        CommandLine.Parse(os.Args[1:])
 }
 
-// Parsed returns true if the command-line flags have been parsed.
+// Parsed reports whether the command-line flags have been parsed.
 func Parsed() bool {
        return CommandLine.Parsed()
 }
index 50e576ec044393635a25ee18c41cfb3a539ab087..bb571166f47209bd738514ac231db83150336766 100644 (file)
@@ -23,8 +23,7 @@ func exportFilter(name string) bool {
 // body) are removed. Non-exported fields and methods of exported types are
 // stripped. The File.Comments list is not changed.
 //
-// FileExports returns true if there are exported declarations;
-// it returns false otherwise.
+// FileExports reports whether there are exported declarations.
 //
 func FileExports(src *File) bool {
        return filterFile(src, exportFilter, true)
@@ -34,7 +33,7 @@ func FileExports(src *File) bool {
 // only exported nodes remain. The pkg.Files list is not changed, so that
 // file names and top-level package comments don't get lost.
 //
-// PackageExports returns true if there are exported declarations;
+// PackageExports reports whether there are exported declarations;
 // it returns false otherwise.
 //
 func PackageExports(pkg *Package) bool {
@@ -199,8 +198,8 @@ func filterSpecList(list []Spec, f Filter, export bool) []Spec {
 // all names (including struct field and interface method names, but
 // not from parameter lists) that don't pass through the filter f.
 //
-// FilterDecl returns true if there are any declared names left after
-// filtering; it returns false otherwise.
+// FilterDecl reports whether there are any declared names left after
+// filtering.
 //
 func FilterDecl(decl Decl, f Filter) bool {
        return filterDecl(decl, f, false)
@@ -224,8 +223,8 @@ func filterDecl(decl Decl, f Filter, export bool) bool {
 // the declaration is removed from the AST. Import declarations are
 // always removed. The File.Comments list is not changed.
 //
-// FilterFile returns true if there are any top-level declarations
-// left after filtering; it returns false otherwise.
+// FilterFile reports whether there are any top-level declarations
+// left after filtering.
 //
 func FilterFile(src *File, f Filter) bool {
        return filterFile(src, f, false)
@@ -251,8 +250,8 @@ func filterFile(src *File, f Filter, export bool) bool {
 // changed, so that file names and top-level package comments don't get
 // lost.
 //
-// FilterPackage returns true if there are any top-level declarations
-// left after filtering; it returns false otherwise.
+// FilterPackage reports whether there are any top-level declarations
+// left after filtering.
 //
 func FilterPackage(pkg *Package, f Filter) bool {
        return filterPackage(pkg, f, false)
index b1fb9ef94fb7d47a77e2bd476b9c79983d231a57..b590105a5c3b79f481d25bd272381b7053829828 100644 (file)
@@ -1228,7 +1228,7 @@ func splitQuoted(s string) (r []string, err error) {
        return args, err
 }
 
-// match returns true if the name is one of:
+// match reports whether the name is one of:
 //
 //     $GOOS
 //     $GOARCH
index 6aa38f15287e05415b515834189c5bf8e0bbd155..4a12b1e55f8ac00f6c1ca2363ba18f11f25e9ffe 100644 (file)
@@ -63,7 +63,7 @@ func removeErrorField(ityp *ast.InterfaceType) {
 }
 
 // filterFieldList removes unexported fields (field names) from the field list
-// in place and returns true if fields were removed. Anonymous fields are
+// in place and reports whether fields were removed. Anonymous fields are
 // recorded with the parent type. filterType is called with the types of
 // all remaining fields.
 //
index d1b766cfbbe05ff1394eaaf624aa795969e055f9..f2df9a76d1b06eb8c8dc6aede3ac9eca68fbe933 100644 (file)
@@ -1365,7 +1365,7 @@ func (p *parser) checkExpr(x ast.Expr) ast.Expr {
        return x
 }
 
-// isTypeName returns true iff x is a (qualified) TypeName.
+// isTypeName reports whether x is a (qualified) TypeName.
 func isTypeName(x ast.Expr) bool {
        switch t := x.(type) {
        case *ast.BadExpr:
@@ -1379,7 +1379,7 @@ func isTypeName(x ast.Expr) bool {
        return true
 }
 
-// isLiteralType returns true iff x is a legal composite literal type.
+// isLiteralType reports whether x is a legal composite literal type.
 func isLiteralType(x ast.Expr) bool {
        switch t := x.(type) {
        case *ast.BadExpr:
index 36f9439a284be4cdcba7d1df3a7ecdfbe5b4074e..f9343d3af0d740942e77915ac64228a6b4b243f5 100644 (file)
@@ -144,7 +144,7 @@ func (p *printer) nextComment() {
        p.commentOffset = infinity
 }
 
-// commentBefore returns true iff the current comment group occurs
+// commentBefore reports whether the current comment group occurs
 // before the next position in the source code and printing it does
 // not introduce implicit semicolons.
 //
index dba8bbd435156a68221d5a9e445785bf9a111577..44dfa19ff350e4dd1f7754fd88db5002533eab5a 100644 (file)
@@ -1165,7 +1165,7 @@ func (p *parser) checkExpr(x ast.Expr) ast.Expr {
        return x
 }
 
-// isTypeName returns true iff x is a (qualified) TypeName.
+// isTypeName reports whether x is a (qualified) TypeName.
 func isTypeName(x ast.Expr) bool {
        switch t := x.(type) {
        case *ast.BadExpr:
@@ -1179,7 +1179,7 @@ func isTypeName(x ast.Expr) bool {
        return true
 }
 
-// isLiteralType returns true iff x is a legal composite literal type.
+// isLiteralType reports whether x is a legal composite literal type.
 func isLiteralType(x ast.Expr) bool {
        switch t := x.(type) {
        case *ast.BadExpr:
index 17452bb3d54d66e6e26991e10ecf6df0814c9871..33751779a3d9b53615a9b521baf7ab9eeca72ce3 100644 (file)
@@ -24,7 +24,7 @@ type Position struct {
        Column   int    // column number, starting at 1 (byte count)
 }
 
-// IsValid returns true if the position is valid.
+// IsValid reports whether the position is valid.
 func (pos *Position) IsValid() bool { return pos.Line > 0 }
 
 // String returns a string in one of several forms:
@@ -77,7 +77,7 @@ type Pos int
 //
 const NoPos Pos = 0
 
-// IsValid returns true if the position is valid.
+// IsValid reports whether the position is valid.
 func (p Pos) IsValid() bool {
        return p != NoPos
 }
@@ -157,7 +157,7 @@ func (f *File) MergeLine(line int) {
        f.lines = f.lines[:len(f.lines)-1]
 }
 
-// SetLines sets the line offsets for a file and returns true if successful.
+// SetLines sets the line offsets for a file and reports whether it succeeded.
 // The line offsets are the offsets of the first character of each line;
 // for instance for the content "ab\nc\n" the line offsets are {0, 3}.
 // An empty file has an empty line offset table.
index db730d1356b2f70106b6a64336f65006cc0c7e9a..2a279d186c4c7ad76b0da1e96c590672774c127c 100644 (file)
@@ -335,7 +335,7 @@ func karatsuba(z, x, y nat) {
        }
 }
 
-// alias returns true if x and y share the same base array.
+// alias reports whether x and y share the same base array.
 func alias(x, y nat) bool {
        return cap(x) > 0 && cap(y) > 0 && &x[0:cap(x)][cap(x)-1] == &y[0:cap(y)][cap(y)-1]
 }
@@ -819,7 +819,7 @@ func (z nat) xor(x, y nat) nat {
        return z.norm()
 }
 
-// greaterThan returns true iff (x1<<_W + x2) > (y1<<_W + y2)
+// greaterThan reports whether (x1<<_W + x2) > (y1<<_W + y2)
 func greaterThan(x1, x2, y1, y2 Word) bool {
        return x1 > y1 || x1 == y1 && x2 > y2
 }
index b73377ea3f8ababb2c7aa33b2564e4e988f023ce..748796c8cad954b5747c39ee38630ca443cb06ae 100644 (file)
@@ -385,7 +385,7 @@ func (x *Rat) Sign() int {
        return x.a.Sign()
 }
 
-// IsInt returns true if the denominator of x is 1.
+// IsInt reports whether the denominator of x is 1.
 func (x *Rat) IsInt() bool {
        return len(x.b.abs) == 0 || x.b.abs.cmp(natOne) == 0
 }
index 2347324aa5ada2eeeb20ac97cc84a32a68a31bd5..31b66e8f03a39d6f6dba87f5f9d70e91d7aae909 100644 (file)
@@ -8,13 +8,13 @@ import (
        "strings"
 )
 
-// isTSpecial returns true if rune is in 'tspecials' as defined by RFC
+// isTSpecial reports whether rune is in 'tspecials' as defined by RFC
 // 1521 and RFC 2045.
 func isTSpecial(r rune) bool {
        return strings.IndexRune(`()<>@,;:\"/[]?=`, r) != -1
 }
 
-// isTokenChar returns true if rune is in 'token' as defined by RFC
+// isTokenChar reports whether rune is in 'token' as defined by RFC
 // 1521 and RFC 2045.
 func isTokenChar(r rune) bool {
        // token := 1*<any (US-ASCII) CHAR except SPACE, CTLs,
@@ -22,7 +22,7 @@ func isTokenChar(r rune) bool {
        return r > 0x20 && r < 0x7f && !isTSpecial(r)
 }
 
-// isToken returns true if s is a 'token' as defined by RFC 1521
+// isToken reports whether s is a 'token' as defined by RFC 1521
 // and RFC 2045.
 func isToken(s string) bool {
        if s == "" {
index c68aa2c9851771824600207664e7a997ab12229c..565c87d3929b1cf454e2ae8bb6c7052924937082 100644 (file)
@@ -981,7 +981,7 @@ func statusLine(req *Request, code int) string {
        return line
 }
 
-// bodyAllowed returns true if a Write is allowed for this response type.
+// bodyAllowed reports whether a Write is allowed for this response type.
 // It's illegal to call this before the header has been flushed.
 func (w *response) bodyAllowed() bool {
        if !w.wroteHeader {
index afeaa8da7626a8d5d45d3f03a5125bb62292933c..b18e445cbc1ca6f0475d7b166504da8ae88a625f 100644 (file)
@@ -662,7 +662,7 @@ func (t *Transport) dialConn(cm connectMethod) (*persistConn, error) {
        return pconn, nil
 }
 
-// useProxy returns true if requests to addr should use a proxy,
+// useProxy reports whether requests to addr should use a proxy,
 // according to the NO_PROXY or no_proxy environment variable.
 // addr is always a canonicalAddr with a host and port.
 func useProxy(addr string) bool {
index f83658ccb9e608154fc0b318278be46bd4a872c3..a554165af767f1519f2ae1b33ed149a09936233c 100644 (file)
@@ -108,7 +108,7 @@ var (
        IPv6linklocalallrouters    = IP{0xff, 0x02, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x02}
 )
 
-// IsUnspecified returns true if ip is an unspecified address.
+// IsUnspecified reports whether ip is an unspecified address.
 func (ip IP) IsUnspecified() bool {
        if ip.Equal(IPv4zero) || ip.Equal(IPv6unspecified) {
                return true
@@ -116,7 +116,7 @@ func (ip IP) IsUnspecified() bool {
        return false
 }
 
-// IsLoopback returns true if ip is a loopback address.
+// IsLoopback reports whether ip is a loopback address.
 func (ip IP) IsLoopback() bool {
        if ip4 := ip.To4(); ip4 != nil && ip4[0] == 127 {
                return true
@@ -124,7 +124,7 @@ func (ip IP) IsLoopback() bool {
        return ip.Equal(IPv6loopback)
 }
 
-// IsMulticast returns true if ip is a multicast address.
+// IsMulticast reports whether ip is a multicast address.
 func (ip IP) IsMulticast() bool {
        if ip4 := ip.To4(); ip4 != nil && ip4[0]&0xf0 == 0xe0 {
                return true
@@ -132,13 +132,13 @@ func (ip IP) IsMulticast() bool {
        return ip[0] == 0xff
 }
 
-// IsInterfaceLocalMulticast returns true if ip is
+// IsInterfaceLocalMulticast reports whether ip is
 // an interface-local multicast address.
 func (ip IP) IsInterfaceLocalMulticast() bool {
        return len(ip) == IPv6len && ip[0] == 0xff && ip[1]&0x0f == 0x01
 }
 
-// IsLinkLocalMulticast returns true if ip is a link-local
+// IsLinkLocalMulticast reports whether ip is a link-local
 // multicast address.
 func (ip IP) IsLinkLocalMulticast() bool {
        if ip4 := ip.To4(); ip4 != nil && ip4[0] == 224 && ip4[1] == 0 && ip4[2] == 0 {
@@ -147,7 +147,7 @@ func (ip IP) IsLinkLocalMulticast() bool {
        return ip[0] == 0xff && ip[1]&0x0f == 0x02
 }
 
-// IsLinkLocalUnicast returns true if ip is a link-local
+// IsLinkLocalUnicast reports whether ip is a link-local
 // unicast address.
 func (ip IP) IsLinkLocalUnicast() bool {
        if ip4 := ip.To4(); ip4 != nil && ip4[0] == 169 && ip4[1] == 254 {
@@ -156,7 +156,7 @@ func (ip IP) IsLinkLocalUnicast() bool {
        return ip[0] == 0xfe && ip[1]&0xc0 == 0x80
 }
 
-// IsGlobalUnicast returns true if ip is a global unicast
+// IsGlobalUnicast reports whether ip is a global unicast
 // address.
 func (ip IP) IsGlobalUnicast() bool {
        return !ip.IsUnspecified() &&
@@ -352,7 +352,7 @@ func (ip *IP) UnmarshalText(text []byte) error {
        return nil
 }
 
-// Equal returns true if ip and x are the same IP address.
+// Equal reports whether ip and x are the same IP address.
 // An IPv4 address and that same address in IPv6 form are
 // considered to be equal.
 func (ip IP) Equal(x IP) bool {
index 71fe74b9ca6608d6860d9ae26ec46830dae6b9a0..f3f698cf237b415768532f8524e8f831529f4104 100644 (file)
@@ -428,7 +428,7 @@ var atextChars = []byte("ABCDEFGHIJKLMNOPQRSTUVWXYZ" +
        "0123456789" +
        "!#$%&'*+-/=?^_`{|}~")
 
-// isAtext returns true if c is an RFC 5322 atext character.
+// isAtext reports whether c is an RFC 5322 atext character.
 // If dot is true, period is included.
 func isAtext(c byte, dot bool) bool {
        if dot && c == '.' {
@@ -437,7 +437,7 @@ func isAtext(c byte, dot bool) bool {
        return bytes.IndexByte(atextChars, c) >= 0
 }
 
-// isQtext returns true if c is an RFC 5322 qtext character.
+// isQtext reports whether c is an RFC 5322 qtext character.
 func isQtext(c byte) bool {
        // Printable US-ASCII, excluding backslash or quote.
        if c == '\\' || c == '"' {
@@ -446,13 +446,13 @@ func isQtext(c byte) bool {
        return '!' <= c && c <= '~'
 }
 
-// isVchar returns true if c is an RFC 5322 VCHAR character.
+// isVchar reports whether c is an RFC 5322 VCHAR character.
 func isVchar(c byte) bool {
        // Visible (printing) characters.
        return '!' <= c && c <= '~'
 }
 
-// isWSP returns true if c is a WSP (white space).
+// isWSP reports whether c is a WSP (white space).
 // WSP is a space or horizontal tab (RFC5234 Appendix B).
 func isWSP(c byte) bool {
        return c == ' ' || c == '\t'
index f167408fabafe38124364cfd889dee59350b2e05..737c95bab9891c9d590361864ff5e2327e62a238 100644 (file)
@@ -639,7 +639,7 @@ func resolvePath(base, ref string) string {
        return "/" + strings.TrimLeft(strings.Join(dst, "/"), "/")
 }
 
-// IsAbs returns true if the URL is absolute.
+// IsAbs reports whether the URL is absolute.
 func (u *URL) IsAbs() bool {
        return u.Scheme != ""
 }
index 64bad500a673bbf047ebd101013ce835fd834b8e..b09b53a3d828cb500f8ba6dc5c396c4a7e5fbafc 100644 (file)
@@ -9,7 +9,7 @@ const (
        PathListSeparator = '\000' // OS-specific path list separator
 )
 
-// IsPathSeparator returns true if c is a directory separator character.
+// IsPathSeparator reports whether c is a directory separator character.
 func IsPathSeparator(c uint8) bool {
        return PathSeparator == c
 }
index 0211107ddfc42d3bb8a7610b043d5edb2ad0ed36..36f8e61bf92ed5d77a751e84a8f521accbb487ee 100644 (file)
@@ -11,7 +11,7 @@ const (
        PathListSeparator = ':' // OS-specific path list separator
 )
 
-// IsPathSeparator returns true if c is a directory separator character.
+// IsPathSeparator reports whether c is a directory separator character.
 func IsPathSeparator(c uint8) bool {
        return PathSeparator == c
 }
index 61f2ca59ff41cd2321fe1cae2cfa64f8907a7dcf..c96f1376860cf78e6e925e496f64e32135ae376f 100644 (file)
@@ -9,7 +9,7 @@ const (
        PathListSeparator = ';'  // OS-specific path list separator
 )
 
-// IsPathSeparator returns true if c is a directory separator character.
+// IsPathSeparator reports whether c is a directory separator character.
 func IsPathSeparator(c uint8) bool {
        // NOTE: Windows accept / as path separator.
        return c == '\\' || c == '/'
index ecc07aa5dac186a3adc4f483b8089fd74266b591..89f16de355e0bab2465d317c3f2e22ed50c66936 100644 (file)
@@ -16,7 +16,7 @@ import (
 // ErrBadPattern indicates a globbing pattern was malformed.
 var ErrBadPattern = errors.New("syntax error in pattern")
 
-// Match returns true if name matches the shell file name pattern.
+// Match reports whether name matches the shell file name pattern.
 // The pattern syntax is:
 //
 //     pattern:
@@ -301,7 +301,7 @@ func glob(dir, pattern string, matches []string) (m []string, e error) {
        return
 }
 
-// hasMeta returns true if path contains any of the magic characters
+// hasMeta reports whether path contains any of the magic characters
 // recognized by Match.
 func hasMeta(path string) bool {
        // TODO(niemeyer): Should other magic characters be added here?
index da5f5fdac71d22f24c701752921cb83c50fbb3f9..962774efd5d9aa180662d31d95f7df8cd444f15c 100644 (file)
@@ -6,7 +6,7 @@ package filepath
 
 import "strings"
 
-// IsAbs returns true if the path is absolute.
+// IsAbs reports whether the path is absolute.
 func IsAbs(path string) bool {
        return strings.HasPrefix(path, "/") || strings.HasPrefix(path, "#")
 }
index 008b76e19e245c5d5769800c6c025fb0a3bdb188..d241d78fa781cfba06253ba4bd196243e1251dd4 100644 (file)
@@ -8,7 +8,7 @@ package filepath
 
 import "strings"
 
-// IsAbs returns true if the path is absolute.
+// IsAbs reports whether the path is absolute.
 func IsAbs(path string) bool {
        return strings.HasPrefix(path, "/")
 }
index d6ed3d142da6e506d67ab29d04f22aeca3912814..bcfe0a34b0a181b2118c070d771109c12baeae8b 100644 (file)
@@ -13,7 +13,7 @@ func isSlash(c uint8) bool {
        return c == '\\' || c == '/'
 }
 
-// IsAbs returns true if the path is absolute.
+// IsAbs reports whether the path is absolute.
 func IsAbs(path string) (b bool) {
        l := volumeNameLen(path)
        if l == 0 {
@@ -141,7 +141,7 @@ func joinNonEmpty(elem []string) string {
        return head + string(Separator) + tail
 }
 
-// isUNC returns true if path is a UNC path.
+// isUNC reports whether path is a UNC path.
 func isUNC(path string) bool {
        return volumeNameLen(path) > 2
 }
index 8154bf6025162104d2f205322a0a3a36fb8115b8..75dd3b38e7c5a82fa925b975cb47de8d34744b26 100644 (file)
@@ -13,7 +13,7 @@ import (
 // ErrBadPattern indicates a globbing pattern was malformed.
 var ErrBadPattern = errors.New("syntax error in pattern")
 
-// Match returns true if name matches the shell file name pattern.
+// Match reports whether name matches the shell file name pattern.
 // The pattern syntax is:
 //
 //     pattern:
index 98a6d5292294829081b99ef59e6784dfa1786184..3f0828c44a5e792726bbb71d3003087490cbf8d7 100644 (file)
@@ -192,7 +192,7 @@ func Base(path string) string {
        return path
 }
 
-// IsAbs returns true if the path is absolute.
+// IsAbs reports whether the path is absolute.
 func IsAbs(path string) bool {
        return len(path) > 0 && path[0] == '/'
 }
index bf1148fd07237059904daed6aaae1e0bcc0b8bde..ccd145499e65dae01cedf5d87548d26e9c90a276 100644 (file)
@@ -87,16 +87,16 @@ type Type interface {
        // Kind returns the specific kind of this type.
        Kind() Kind
 
-       // Implements returns true if the type implements the interface type u.
+       // Implements reports whether the type implements the interface type u.
        Implements(u Type) bool
 
-       // AssignableTo returns true if a value of the type is assignable to type u.
+       // AssignableTo reports whether a value of the type is assignable to type u.
        AssignableTo(u Type) bool
 
-       // ConvertibleTo returns true if a value of the type is convertible to type u.
+       // ConvertibleTo reports whether a value of the type is convertible to type u.
        ConvertibleTo(u Type) bool
 
-       // Comparable returns true if values of this type are comparable.
+       // Comparable reports whether values of this type are comparable.
        Comparable() bool
 
        // Methods applicable only to some types, depending on Kind.
@@ -120,7 +120,7 @@ type Type interface {
        // It panics if the type's Kind is not Chan.
        ChanDir() ChanDir
 
-       // IsVariadic returns true if a function type's final input parameter
+       // IsVariadic reports whether a function type's final input parameter
        // is a "..." parameter.  If so, t.In(t.NumIn() - 1) returns the parameter's
        // implicit actual type []T.
        //
@@ -1122,7 +1122,7 @@ func (t *rtype) Comparable() bool {
        return t.alg != nil && t.alg.equal != nil
 }
 
-// implements returns true if the type V implements the interface type T.
+// implements reports whether the type V implements the interface type T.
 func implements(T, V *rtype) bool {
        if T.Kind() != Interface {
                return false
@@ -1176,7 +1176,7 @@ func implements(T, V *rtype) bool {
        return false
 }
 
-// directlyAssignable returns true if a value x of type V can be directly
+// directlyAssignable reports whether a value x of type V can be directly
 // assigned (using memmove) to a value of type T.
 // http://golang.org/doc/go_spec.html#Assignability
 // Ignoring the interface rules (implemented elsewhere)
index ad106f53dd97adc0ddb3ac52fad7ae4c76ca8ba0..27f9c2dc8c0d87c74095a50eca7375b844f1c312 100644 (file)
@@ -268,7 +268,7 @@ func (v Value) runes() []rune {
        return *(*[]rune)(v.ptr)
 }
 
-// CanAddr returns true if the value's address can be obtained with Addr.
+// CanAddr reports whether the value's address can be obtained with Addr.
 // Such values are called addressable.  A value is addressable if it is
 // an element of a slice, an element of an addressable array,
 // a field of an addressable struct, or the result of dereferencing a pointer.
@@ -277,7 +277,7 @@ func (v Value) CanAddr() bool {
        return v.flag&flagAddr != 0
 }
 
-// CanSet returns true if the value of v can be changed.
+// CanSet reports whether the value of v can be changed.
 // A Value can be changed only if it is addressable and was not
 // obtained by the use of unexported struct fields.
 // If CanSet returns false, calling Set or any type-specific
@@ -884,7 +884,7 @@ func (v Value) Int() int64 {
        panic(&ValueError{"reflect.Value.Int", v.kind()})
 }
 
-// CanInterface returns true if Interface can be used without panicking.
+// CanInterface reports whether Interface can be used without panicking.
 func (v Value) CanInterface() bool {
        if v.flag == 0 {
                panic(&ValueError{"reflect.Value.CanInterface", Invalid})
@@ -971,7 +971,7 @@ func (v Value) IsNil() bool {
        panic(&ValueError{"reflect.Value.IsNil", v.kind()})
 }
 
-// IsValid returns true if v represents a value.
+// IsValid reports whether v represents a value.
 // It returns false if v is the zero Value.
 // If IsValid returns false, all other methods except String panic.
 // Most functions and methods never return an invalid value.
@@ -1148,7 +1148,7 @@ func (v Value) NumField() int {
        return len(tt.fields)
 }
 
-// OverflowComplex returns true if the complex128 x cannot be represented by v's type.
+// OverflowComplex reports whether the complex128 x cannot be represented by v's type.
 // It panics if v's Kind is not Complex64 or Complex128.
 func (v Value) OverflowComplex(x complex128) bool {
        k := v.kind()
@@ -1161,7 +1161,7 @@ func (v Value) OverflowComplex(x complex128) bool {
        panic(&ValueError{"reflect.Value.OverflowComplex", v.kind()})
 }
 
-// OverflowFloat returns true if the float64 x cannot be represented by v's type.
+// OverflowFloat reports whether the float64 x cannot be represented by v's type.
 // It panics if v's Kind is not Float32 or Float64.
 func (v Value) OverflowFloat(x float64) bool {
        k := v.kind()
@@ -1181,7 +1181,7 @@ func overflowFloat32(x float64) bool {
        return math.MaxFloat32 < x && x <= math.MaxFloat64
 }
 
-// OverflowInt returns true if the int64 x cannot be represented by v's type.
+// OverflowInt reports whether the int64 x cannot be represented by v's type.
 // It panics if v's Kind is not Int, Int8, int16, Int32, or Int64.
 func (v Value) OverflowInt(x int64) bool {
        k := v.kind()
@@ -1194,7 +1194,7 @@ func (v Value) OverflowInt(x int64) bool {
        panic(&ValueError{"reflect.Value.OverflowInt", v.kind()})
 }
 
-// OverflowUint returns true if the uint64 x cannot be represented by v's type.
+// OverflowUint reports whether the uint64 x cannot be represented by v's type.
 // It panics if v's Kind is not Uint, Uintptr, Uint8, Uint16, Uint32, or Uint64.
 func (v Value) OverflowUint(x uint64) bool {
        k := v.kind()
@@ -1647,7 +1647,7 @@ func (v Value) TryRecv() (x Value, ok bool) {
 
 // TrySend attempts to send x on the channel v but will not block.
 // It panics if v's Kind is not Chan.
-// It returns true if the value was sent, false otherwise.
+// It reports whether the value was sent.
 // As in Go, x's value must be assignable to the channel's element type.
 func (v Value) TrySend(x Value) bool {
        v.mustBe(Chan)
index 29bd282d0d96c7c0c235037b9f0bcac33c592bfe..ae6db31a44140eb4df2e81a8e442e784efd5ccee 100644 (file)
@@ -189,7 +189,7 @@ Loop:
 
 const noMatch = -1
 
-// MatchRune returns true if the instruction matches (and consumes) r.
+// MatchRune reports whether the instruction matches (and consumes) r.
 // It should only be called when i.Op == InstRune.
 func (i *Inst) MatchRune(r rune) bool {
        return i.MatchRunePos(r) != noMatch
@@ -256,7 +256,7 @@ func wordRune(r rune) bool {
                ('0' <= r && r <= '9')
 }
 
-// MatchEmptyWidth returns true if the instruction matches
+// MatchEmptyWidth reports whether the instruction matches
 // an empty string between the runes before and after.
 // It should only be called when i.Op == InstEmptyWidth.
 func (i *Inst) MatchEmptyWidth(before rune, after rune) bool {
index 9db5faf348dc58ac55619a478ee6d3c7278d6924..b6f43747d608a97b5c02a71ddc6c8e169b5e49d9 100644 (file)
@@ -646,7 +646,7 @@ func topofstack(f *_func) bool {
                externalthreadhandlerp != 0 && pc == externalthreadhandlerp
 }
 
-// isSystemGoroutine returns true if the goroutine g must be omitted in
+// isSystemGoroutine reports whether the goroutine g must be omitted in
 // stack dumps and deadlock detector.
 func isSystemGoroutine(gp *g) bool {
        pc := gp.startpc
index bed8b16bdaef3ca1f5eb4eb9b08f2a13eb856919..019b4eebdc970a2da78601f54c7579d0d63d8336 100644 (file)
@@ -256,7 +256,7 @@ var uint64pow10 = [...]uint64{
 }
 
 // AssignDecimal sets f to an approximate value mantissa*10^exp. It
-// returns true if the value represented by f is guaranteed to be the
+// reports whether the value represented by f is guaranteed to be the
 // best approximation of d after being rounded to a float64 or
 // float32 depending on flt.
 func (f *extFloat) AssignDecimal(mantissa uint64, exp10 int, neg bool, trunc bool, flt *floatInfo) (ok bool) {
index f362f185a9b2ae64b0cc4414084e91902e22b103..f81a1e2b52b955a5efd46ebe9fc560e9408cc093 100644 (file)
@@ -126,17 +126,17 @@ func Count(s, sep string) int {
        return n
 }
 
-// Contains returns true if substr is within s.
+// Contains reports whether substr is within s.
 func Contains(s, substr string) bool {
        return Index(s, substr) >= 0
 }
 
-// ContainsAny returns true if any Unicode code points in chars are within s.
+// ContainsAny reports whether any Unicode code points in chars are within s.
 func ContainsAny(s, chars string) bool {
        return IndexAny(s, chars) >= 0
 }
 
-// ContainsRune returns true if the Unicode code point r is within s.
+// ContainsRune reports whether the Unicode code point r is within s.
 func ContainsRune(s string, r rune) bool {
        return IndexRune(s, r) >= 0
 }
index 5199ee4fc7dc4c4e9afbd4c84454dee9a13cb753..9638577bcf258649fa1a823ac4ee9a7b6145e16e 100644 (file)
@@ -43,7 +43,7 @@ type Position struct {
        Column   int    // column number, starting at 1 (character count per line)
 }
 
-// IsValid returns true if the position is valid.
+// IsValid reports whether the position is valid.
 func (pos *Position) IsValid() bool { return pos.Line > 0 }
 
 func (pos Position) String() string {
index 0325399132c5549a59037b3f0ba3a43856cb2c55..3d2ff37df059052ed05d38f11b99109d1c586cf2 100644 (file)
@@ -288,7 +288,7 @@ var longMonthNames = []string{
        "December",
 }
 
-// match returns true if s1 and s2 match ignoring case.
+// match reports whether s1 and s2 match ignoring case.
 // It is assumed s1 and s2 are the same length.
 func match(s1, s2 string) bool {
        for i := 0; i < len(s1); i++ {
@@ -620,8 +620,7 @@ func (e *ParseError) Error() string {
                quote(e.Value) + e.Message
 }
 
-// isDigit returns true if s[i] is a decimal digit, false if not or
-// if s[i] is out of range.
+// isDigit reports whether s[i] is in range and is a decimal digit.
 func isDigit(s string, i int) bool {
        if len(s) <= i {
                return false
index c0e47c535ab6290f0e02abbea05e8ae2dad1a761..b497500778ede09c1da0fbd94a58f52a16beb92b 100644 (file)
@@ -25,7 +25,7 @@ const (
        surrSelf = 0x10000
 )
 
-// IsSurrogate returns true if the specified Unicode code point
+// IsSurrogate reports whether the specified Unicode code point
 // can appear in a surrogate pair.
 func IsSurrogate(r rune) bool {
        return surr1 <= r && r < surr3