]> Cypherpunks.ru repositories - gostls13.git/commitdiff
all: use "reports whether" consistently instead of "returns whether"
authorTobias Klauser <tklauser@distanz.ch>
Thu, 22 Nov 2018 10:46:44 +0000 (11:46 +0100)
committerTobias Klauser <tobias.klauser@gmail.com>
Sun, 2 Dec 2018 15:12:26 +0000 (15:12 +0000)
Follow-up for CL 147037 and after Brad noticed the "returns whether"
pattern during the review of CL 150621.

Go documentation style for boolean funcs is to say:

    // Foo reports whether ...
    func Foo() bool

(rather than "returns whether")

Created with:

    $ perl -i -npe 's/returns whether/reports whether/' $(git grep -l "returns whether" | grep -v vendor)

Change-Id: I15fe9ff99180ad97750cd05a10eceafdb12dc0b4
Reviewed-on: https://go-review.googlesource.com/c/150918
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
51 files changed:
src/bytes/buffer.go
src/cmd/cgo/gcc.go
src/cmd/cgo/out.go
src/cmd/compile/internal/gc/reflect.go
src/cmd/compile/internal/mips/ssa.go
src/cmd/compile/internal/mips64/ssa.go
src/cmd/compile/internal/ssa/biasedsparsemap.go
src/cmd/compile/internal/ssa/config.go
src/cmd/compile/internal/ssa/magic.go
src/cmd/compile/internal/ssa/numberlines.go
src/cmd/compile/internal/ssa/rewrite.go
src/cmd/compile/internal/ssa/value.go
src/cmd/compile/internal/ssa/writebarrier.go
src/cmd/compile/internal/types/type.go
src/cmd/internal/obj/arm64/asm7.go
src/cmd/internal/objabi/reloctype.go
src/cmd/link/internal/ld/data.go
src/cmd/link/internal/ld/lib.go
src/cmd/pprof/readlineui.go
src/cmd/trace/annotations.go
src/crypto/tls/common.go
src/crypto/tls/handshake_server_tls13.go
src/crypto/x509/pkix/pkix.go
src/crypto/x509/verify.go
src/crypto/x509/x509.go
src/database/sql/sql.go
src/debug/dwarf/line.go
src/go/printer/nodes.go
src/internal/goroot/gc.go
src/internal/goroot/gccgo.go
src/net/http/cookie.go
src/net/http/h2_bundle.go
src/net/http/server.go
src/net/interface.go
src/os/wait_unimp.go
src/os/wait_wait6.go
src/os/wait_waitid.go
src/path/filepath/symlink_windows.go
src/runtime/cgocall.go
src/runtime/mbitmap.go
src/runtime/mgcmark.go
src/runtime/pprof/internal/profile/filter.go
src/runtime/proc.go
src/runtime/select.go
src/runtime/signal_unix.go
src/runtime/stubs.go
src/runtime/trace/annotation.go
src/runtime/traceback.go
src/runtime/vdso_linux.go
src/testing/benchmark.go
src/time/zoneinfo.go

index 087cc0e427561d2714f3b84e9e3f3633e510b406..aff2db5084f11e20657f9e61897f278b26e626fc 100644 (file)
@@ -68,7 +68,7 @@ func (b *Buffer) String() string {
        return string(b.buf[b.off:])
 }
 
-// empty returns whether the unread portion of the buffer is empty.
+// empty reports whether the unread portion of the buffer is empty.
 func (b *Buffer) empty() bool { return len(b.buf) <= b.off }
 
 // Len returns the number of bytes of the unread portion of the buffer;
index b5bc87dde686acdbb3855bc14925aea1583b9389..3c96af2be61bd25c0c6dcb0bc08b64158bfea672 100644 (file)
@@ -718,7 +718,7 @@ func (p *Package) mangleName(n *Name) {
 
 // rewriteCalls rewrites all calls that pass pointers to check that
 // they follow the rules for passing pointers between Go and C.
-// This returns whether the package needs to import unsafe as _cgo_unsafe.
+// This reports whether the package needs to import unsafe as _cgo_unsafe.
 func (p *Package) rewriteCalls(f *File) bool {
        needsUnsafe := false
        // Walk backward so that in C.f1(C.f2()) we rewrite C.f2 first.
@@ -941,7 +941,7 @@ func (p *Package) rewriteCall(f *File, call *Call) (string, bool) {
        return sb.String(), needsUnsafe
 }
 
-// needsPointerCheck returns whether the type t needs a pointer check.
+// needsPointerCheck reports whether the type t needs a pointer check.
 // This is true if t is a pointer and if the value to which it points
 // might contain a pointer.
 func (p *Package) needsPointerCheck(f *File, t ast.Expr, arg ast.Expr) bool {
@@ -958,7 +958,7 @@ func (p *Package) needsPointerCheck(f *File, t ast.Expr, arg ast.Expr) bool {
 
 // hasPointer is used by needsPointerCheck. If top is true it returns
 // whether t is or contains a pointer that might point to a pointer.
-// If top is false it returns whether t is or contains a pointer.
+// If top is false it reports whether t is or contains a pointer.
 // f may be nil.
 func (p *Package) hasPointer(f *File, t ast.Expr, top bool) bool {
        switch t := t.(type) {
@@ -1172,7 +1172,7 @@ func (p *Package) checkAddr(sb, sbCheck *bytes.Buffer, arg ast.Expr, i int) bool
        return true
 }
 
-// isType returns whether the expression is definitely a type.
+// isType reports whether the expression is definitely a type.
 // This is conservative--it returns false for an unknown identifier.
 func (p *Package) isType(t ast.Expr) bool {
        switch t := t.(type) {
@@ -1214,7 +1214,7 @@ func (p *Package) isType(t ast.Expr) bool {
        return false
 }
 
-// isConst returns whether x is an untyped constant expression.
+// isConst reports whether x is an untyped constant expression.
 func (p *Package) isConst(f *File, x ast.Expr) bool {
        switch x := x.(type) {
        case *ast.BasicLit:
@@ -2827,7 +2827,7 @@ func (c *typeConv) Struct(dt *dwarf.StructType, pos token.Pos) (expr *ast.Struct
        return
 }
 
-// dwarfHasPointer returns whether the DWARF type dt contains a pointer.
+// dwarfHasPointer reports whether the DWARF type dt contains a pointer.
 func (c *typeConv) dwarfHasPointer(dt dwarf.Type, pos token.Pos) bool {
        switch dt := dt.(type) {
        default:
index c49b51c611c9419cb36d1b8dddad95802d422e5f..401a87fecab59fd19c37dee442bfef5403dc2c49 100644 (file)
@@ -1203,7 +1203,7 @@ func (p *Package) writeExportHeader(fgcch io.Writer) {
        fmt.Fprintf(fgcch, "%s\n", p.gccExportHeaderProlog())
 }
 
-// gccgoUsesNewMangling returns whether gccgo uses the new collision-free
+// gccgoUsesNewMangling reports whether gccgo uses the new collision-free
 // packagepath mangling scheme (see determineGccgoManglingScheme for more
 // info).
 func gccgoUsesNewMangling() bool {
index 8310b8d2fc8c7ff76bb657d08e67da0acd689dc5..2863d4b5d0ca7862eb7ff0d499e997b0c6ed0ec1 100644 (file)
@@ -915,7 +915,7 @@ func dcommontype(lsym *obj.LSym, t *types.Type) int {
        return ot
 }
 
-// typeHasNoAlg returns whether t does not have any associated hash/eq
+// typeHasNoAlg reports whether t does not have any associated hash/eq
 // algorithms because t, or some component of t, is marked Noalg.
 func typeHasNoAlg(t *types.Type) bool {
        a, bad := algtype1(t)
index 2bf17dc4151d1fc59095f350165c63b1d969850d..97a9b20537de33cb262301879ed5347d4fdd2bc0 100644 (file)
@@ -14,12 +14,12 @@ import (
        "cmd/internal/obj/mips"
 )
 
-// isFPreg returns whether r is an FP register
+// isFPreg reports whether r is an FP register
 func isFPreg(r int16) bool {
        return mips.REG_F0 <= r && r <= mips.REG_F31
 }
 
-// isHILO returns whether r is HI or LO register
+// isHILO reports whether r is HI or LO register
 func isHILO(r int16) bool {
        return r == mips.REG_HI || r == mips.REG_LO
 }
index bf2076f5fb380d475e0bca93a0df9fc66e6a5318..8a2d2b0f7a4518e4bccf6555b5af1b50543d6e49 100644 (file)
@@ -14,12 +14,12 @@ import (
        "cmd/internal/obj/mips"
 )
 
-// isFPreg returns whether r is an FP register
+// isFPreg reports whether r is an FP register
 func isFPreg(r int16) bool {
        return mips.REG_F0 <= r && r <= mips.REG_F31
 }
 
-// isHILO returns whether r is HI or LO register
+// isHILO reports whether r is HI or LO register
 func isHILO(r int16) bool {
        return r == mips.REG_HI || r == mips.REG_LO
 }
index e1901f2135c2867d92ef113459e24652a82bf37d..f9d3afa7457485184d5b9cbe41d910ba706f96f7 100644 (file)
@@ -43,7 +43,7 @@ func (s *biasedSparseMap) size() int {
        return s.s.size()
 }
 
-// contains returns whether x is a key in s
+// contains reports whether x is a key in s
 func (s *biasedSparseMap) contains(x uint) bool {
        if s.s == nil {
                return false
index 558c4b7db8fff9ea449d47872cb4f5d44b94ca97..5d7504392c05b3df363877572e060de33c553e5a 100644 (file)
@@ -164,7 +164,7 @@ type Frontend interface {
        // given name.
        Syslook(string) *obj.LSym
 
-       // UseWriteBarrier returns whether write barrier is enabled
+       // UseWriteBarrier reports whether write barrier is enabled
        UseWriteBarrier() bool
 
        // SetWBPos indicates that a write barrier has been inserted
index 0457e90b53c935b085f67ee3854b16d4a98167c7..12044111ea8b3cf7cbd86e5af9b17e095b20c881 100644 (file)
@@ -83,7 +83,7 @@ import "math/big"
 //                   a+b has n+1 bits in it.  Nevertheless, can be done
 //                   in 2 instructions on x86.)
 
-// umagicOK returns whether we should strength reduce a n-bit divide by c.
+// umagicOK reports whether we should strength reduce a n-bit divide by c.
 func umagicOK(n uint, c int64) bool {
        // Convert from ConstX auxint values to the real uint64 constant they represent.
        d := uint64(c) << (64 - n) >> (64 - n)
index 662f58e4b576690b24218bdab12ff09cfaba476f..3e14b9e3df38ac86e2fd116135cbac1fd6f8a6fa 100644 (file)
@@ -20,7 +20,7 @@ func isPoorStatementOp(op Op) bool {
        return false
 }
 
-// LosesStmtMark returns whether a prog with op as loses its statement mark on the way to DWARF.
+// LosesStmtMark reports whether a prog with op as loses its statement mark on the way to DWARF.
 // The attributes from some opcodes are lost in translation.
 // TODO: this is an artifact of how funcpctab combines information for instructions at a single PC.
 // Should try to fix it there.
index 7ddf215478707947c5553c6e7f8a26c89e3bd08b..6ea46e7327fdb9af6ba2edd2e5f5de12b4f64b61 100644 (file)
@@ -320,7 +320,7 @@ func canMergeLoad(target, load *Value) bool {
        return true
 }
 
-// isSameSym returns whether sym is the same as the given named symbol
+// isSameSym reports whether sym is the same as the given named symbol
 func isSameSym(sym interface{}, name string) bool {
        s, ok := sym.(fmt.Stringer)
        return ok && s.String() == name
index 7e869f29c9211298b0b50aca653640c8c347e8bf..6e35a3c7773d649c2927d6768140d42837dbee2a 100644 (file)
@@ -300,7 +300,7 @@ func (v *Value) Fatalf(msg string, args ...interface{}) {
        v.Block.Func.fe.Fatalf(v.Pos, msg, args...)
 }
 
-// isGenericIntConst returns whether v is a generic integer constant.
+// isGenericIntConst reports whether v is a generic integer constant.
 func (v *Value) isGenericIntConst() bool {
        return v != nil && (v.Op == OpConst64 || v.Op == OpConst32 || v.Op == OpConst16 || v.Op == OpConst8)
 }
index 95816d2bdaa949c11a9904dc01172af824e5789f..1024ab25abf8a8d480ed6c31aee5af1e0ca56a74 100644 (file)
@@ -11,7 +11,7 @@ import (
        "strings"
 )
 
-// needwb returns whether we need write barrier for store op v.
+// needwb reports whether we need write barrier for store op v.
 // v must be Store/Move/Zero.
 func needwb(v *Value) bool {
        t, ok := v.Aux.(*types.Type)
index 46a9b816809b55711af811091d34565a87ca59e6..3e5f5cbf4949f3ce943cd45c056403f06fe6515f 100644 (file)
@@ -1457,7 +1457,7 @@ func Haspointers1(t *Type, ignoreNotInHeap bool) bool {
        return true
 }
 
-// HasHeapPointer returns whether t contains a heap pointer.
+// HasHeapPointer reports whether t contains a heap pointer.
 // This is used for write barrier insertion, so it ignores
 // pointers to go:notinheap types.
 func (t *Type) HasHeapPointer() bool {
index 9746426d909d2a1e4b49507de9f141999cae751f..093b2228983d6bd12ac92aa903809969293d841a 100644 (file)
@@ -1183,7 +1183,7 @@ func isaddcon(v int64) bool {
        return v <= 0xFFF
 }
 
-// isbitcon returns whether a constant can be encoded into a logical instruction.
+// isbitcon reports whether a constant can be encoded into a logical instruction.
 // bitcon has a binary form of repetition of a bit sequence of length 2, 4, 8, 16, 32, or 64,
 // which itself is a rotate (w.r.t. the length of the unit) of a sequence of ones.
 // special cases: 0 and -1 are not bitcon.
index a3e2868a1bc9403161af4fdb1f519fea0ad103ba..355882c63880af3d0e60f7cd3a56d4f1a3ce2c9d 100644 (file)
@@ -198,7 +198,7 @@ const (
        R_WASMIMPORT
 )
 
-// IsDirectJump returns whether r is a relocation for a direct jump.
+// IsDirectJump reports whether r is a relocation for a direct jump.
 // A direct jump is a CALL or JMP instruction that takes the target address
 // as immediate. The address is embedded into the instruction, possibly
 // with limited width.
index ffa20bb637574509a40cd21eb1d1a89dd7e71584..848087d7436bb80e6f08f15b0197b3e98fa718af 100644 (file)
@@ -48,7 +48,7 @@ import (
        "sync"
 )
 
-// isRuntimeDepPkg returns whether pkg is the runtime package or its dependency
+// isRuntimeDepPkg reports whether pkg is the runtime package or its dependency
 func isRuntimeDepPkg(pkg string) bool {
        switch pkg {
        case "runtime",
index 9b04e3ce11113c71027a34c16b68cd8e54f69e39..6c5bc542a77c477a51f152753dce16de54a52eb6 100644 (file)
@@ -158,7 +158,7 @@ const (
        MINFUNC = 16 // minimum size for a function
 )
 
-// DynlinkingGo returns whether we are producing Go code that can live
+// DynlinkingGo reports whether we are producing Go code that can live
 // in separate shared libraries linked together at runtime.
 func (ctxt *Link) DynlinkingGo() bool {
        if !ctxt.Loaded {
@@ -167,12 +167,12 @@ func (ctxt *Link) DynlinkingGo() bool {
        return ctxt.BuildMode == BuildModeShared || ctxt.linkShared || ctxt.BuildMode == BuildModePlugin || ctxt.CanUsePlugins()
 }
 
-// CanUsePlugins returns whether a plugins can be used
+// CanUsePlugins reports whether a plugins can be used
 func (ctxt *Link) CanUsePlugins() bool {
        return ctxt.Syms.ROLookup("plugin.Open", sym.SymVerABIInternal) != nil
 }
 
-// UseRelro returns whether to make use of "read only relocations" aka
+// UseRelro reports whether to make use of "read only relocations" aka
 // relro.
 func (ctxt *Link) UseRelro() bool {
        switch ctxt.BuildMode {
index bf2f32118445729784e2120e171c43edd8f135c4..5b9701a0e22f519593ce8426f520a9007fbe84fb 100644 (file)
@@ -101,7 +101,7 @@ func colorize(msg string) string {
        return colorEscape + msg + colorResetEscape
 }
 
-// IsTerminal returns whether the UI is known to be tied to an
+// IsTerminal reports whether the UI is known to be tied to an
 // interactive terminal (as opposed to being redirected to a file).
 func (r *readlineUI) IsTerminal() bool {
        const stdout = 1
index 2fb1198cf6c0f23099218c235c9366446807eced..24984156811c4c6e41fe7f7a43137f75ebbb7b54 100644 (file)
@@ -538,7 +538,7 @@ func (task *taskDesc) overlappingInstant(ev *trace.Event) bool {
        return false
 }
 
-// overlappingDuration returns whether the durational event, ev, overlaps with
+// overlappingDuration reports whether the durational event, ev, overlaps with
 // any of the task's region if ev is a goroutine-local event, or overlaps with
 // the task's lifetime if ev is a global event. It returns the overlapping time
 // as well.
index b5e4ab734c1a02cfd7c8a4f228599e7a7c0c8341..0bc40ccf0b506d958dd80b17e3893b1c813caa52 100644 (file)
@@ -240,7 +240,7 @@ const (
        RequireAndVerifyClientCert
 )
 
-// requiresClientCert returns whether the ClientAuthType requires a client
+// requiresClientCert reports whether the ClientAuthType requires a client
 // certificate to be provided.
 func requiresClientCert(c ClientAuthType) bool {
        switch c {
index fa76f7ca065679ebb8fc26c973c0078768301f8b..5f634b36aaf80bf787a3a9c79260fa66137f0823 100644 (file)
@@ -464,7 +464,7 @@ func (hs *serverHandshakeStateTLS13) doHelloRetryRequest(selectedGroup CurveID)
        return nil
 }
 
-// illegalClientHelloChange returns whether the two ClientHello messages are
+// illegalClientHelloChange reports whether the two ClientHello messages are
 // different, with the exception of the changes allowed before and after a
 // HelloRetryRequest. See RFC 8446, Section 4.1.2.
 func illegalClientHelloChange(ch, ch1 *clientHelloMsg) bool {
index 59c3b15c8349bf9411ea6b5ea840f622a67ab5e1..0f595780874665ba4a53afae9343eca2c4c36a72 100644 (file)
@@ -227,7 +227,7 @@ func (n Name) String() string {
        return n.ToRDNSequence().String()
 }
 
-// oidInAttributeTypeAndValue returns whether a type with the given OID exists
+// oidInAttributeTypeAndValue reports whether a type with the given OID exists
 // in atv.
 func oidInAttributeTypeAndValue(oid asn1.ObjectIdentifier, atv []AttributeTypeAndValue) bool {
        for _, a := range atv {
index 23ee2d251299af897beb4af9c3d283f6a3a0eea3..ea78ab123f202be9d5218ebadae9b3194293adad 100644 (file)
@@ -858,7 +858,7 @@ nextIntermediate:
        return
 }
 
-// validHostname returns whether host is a valid hostname that can be matched or
+// validHostname reports whether host is a valid hostname that can be matched or
 // matched against according to RFC 6125 2.2, with some leniency to accommodate
 // legacy values.
 func validHostname(host string) bool {
index d8587aba927d96068bd7ab68ce2ca5af30f34b67..08681a6ee2884117f4c209ff472269e7958a0eea 100644 (file)
@@ -1641,7 +1641,7 @@ var (
        oidAuthorityInfoAccessIssuers = asn1.ObjectIdentifier{1, 3, 6, 1, 5, 5, 7, 48, 2}
 )
 
-// oidNotInExtensions returns whether an extension with the given oid exists in
+// oidNotInExtensions reports whether an extension with the given oid exists in
 // extensions.
 func oidInExtensions(oid asn1.ObjectIdentifier, extensions []pkix.Extension) bool {
        for _, e := range extensions {
index 71800aae83edb456d21eb8364867e83fb4c184f7..b0353ab4dc7829d894df67723a5c0867871b922a 100644 (file)
@@ -2821,7 +2821,7 @@ func (ci *ColumnType) ScanType() reflect.Type {
        return ci.scanType
 }
 
-// Nullable returns whether the column may be null.
+// Nullable reports whether the column may be null.
 // If a driver does not support this property ok will be false.
 func (ci *ColumnType) Nullable() (nullable, ok bool) {
        return ci.nullable, ci.hasNullable
index 4e6e1429d93b97beca5c277e08fa1ccd999aff86..b862b49d62788be0cd79ca176ef257ab908be2be 100644 (file)
@@ -590,7 +590,7 @@ func (r *LineReader) SeekPC(pc uint64, entry *LineEntry) error {
        }
 }
 
-// pathIsAbs returns whether path is an absolute path (or "full path
+// pathIsAbs reports whether path is an absolute path (or "full path
 // name" in DWARF parlance). This is in "whatever form makes sense for
 // the host system", so this accepts both UNIX-style and DOS-style
 // absolute paths. We avoid the filepath package because we want this
index d22f865652246eb7559eb7b99c36a131db4cd527..0f2029cadaa7d136def1a4407ba9c73e5a082586 100644 (file)
@@ -976,7 +976,7 @@ func (p *printer) possibleSelectorExpr(expr ast.Expr, prec1, depth int) bool {
        return false
 }
 
-// selectorExpr handles an *ast.SelectorExpr node and returns whether x spans
+// selectorExpr handles an *ast.SelectorExpr node and reports whether x spans
 // multiple lines.
 func (p *printer) selectorExpr(x *ast.SelectorExpr, depth int, isMethod bool) bool {
        p.expr1(x.X, token.HighestPrec, depth)
index b9da9a53014f4075aee01077fcd60c2561572c17..9d846d8c49ac145c004f35baf191fc161c015c43 100644 (file)
@@ -14,7 +14,7 @@ import (
        "sync"
 )
 
-// IsStandardPackage returns whether path is a standard package,
+// IsStandardPackage reports whether path is a standard package,
 // given goroot and compiler.
 func IsStandardPackage(goroot, compiler, path string) bool {
        switch compiler {
@@ -95,7 +95,7 @@ func (gd *gccgoDirs) init() {
        gd.dirs = append(gd.dirs, lastDirs...)
 }
 
-// isStandard returns whether path is a standard library for gccgo.
+// isStandard reports whether path is a standard library for gccgo.
 func (gd *gccgoDirs) isStandard(path string) bool {
        // Quick check: if the first path component has a '.', it's not
        // in the standard library. This skips most GOPATH directories.
index 098e77d893f4b82ab50dc774ddcae2437431e1a5..3530e59a15f88d1452c73bba2729d8a91e44cd1f 100644 (file)
@@ -11,7 +11,7 @@ import (
        "path/filepath"
 )
 
-// IsStandardPackage returns whether path is a standard package,
+// IsStandardPackage reports whether path is a standard package,
 // given goroot and compiler.
 func IsStandardPackage(goroot, compiler, path string) bool {
        switch compiler {
index ad7903f074c185d3a0c3e558b034f0ca2c9d3918..63f62214db825d787b9a10bacb940ff31b0ced4b 100644 (file)
@@ -263,7 +263,7 @@ func readCookies(h Header, filter string) []*Cookie {
        return cookies
 }
 
-// validCookieDomain returns whether v is a valid cookie domain-value.
+// validCookieDomain reports whether v is a valid cookie domain-value.
 func validCookieDomain(v string) bool {
        if isCookieDomainName(v) {
                return true
@@ -274,13 +274,13 @@ func validCookieDomain(v string) bool {
        return false
 }
 
-// validCookieExpires returns whether v is a valid cookie expires-value.
+// validCookieExpires reports whether v is a valid cookie expires-value.
 func validCookieExpires(t time.Time) bool {
        // IETF RFC 6265 Section 5.1.1.5, the year must not be less than 1601
        return t.Year() >= 1601
 }
 
-// isCookieDomainName returns whether s is a valid domain name or a valid
+// isCookieDomainName reports whether s is a valid domain name or a valid
 // domain name with a leading dot '.'.  It is almost a direct copy of
 // package net's isDomainName.
 func isCookieDomainName(s string) bool {
index 77ab0343f4222bca16facec041431c5d2e36199b..676eebdfdf9e09f88dd36a199c61629d1ee3575f 100644 (file)
@@ -4852,7 +4852,7 @@ func (sc *http2serverConn) resetStream(se http2StreamError) {
 
 // processFrameFromReader processes the serve loop's read from readFrameCh from the
 // frame-reading goroutine.
-// processFrameFromReader returns whether the connection should be kept open.
+// processFrameFromReader reports whether the connection should be kept open.
 func (sc *http2serverConn) processFrameFromReader(res http2readFrameResult) bool {
        sc.serveG.check()
        err := res.err
index 97ed59e9fd1e8b7ad234c8393acb68980cfe04db..aa9c3f5d2ebd50c61e5c44cc424667456260283c 100644 (file)
@@ -3082,7 +3082,7 @@ func (srv *Server) ListenAndServeTLS(certFile, keyFile string) error {
 }
 
 // setupHTTP2_ServeTLS conditionally configures HTTP/2 on
-// srv and returns whether there was an error setting it up. If it is
+// srv and reports whether there was an error setting it up. If it is
 // not configured for policy reasons, nil is returned.
 func (srv *Server) setupHTTP2_ServeTLS() error {
        srv.nextProtoOnce.Do(srv.onceSetNextProtoDefaults)
index f68df98aa27669d0bcbd7d6babc002434b751632..8d29a44db804b3fc38adcf022596f13601ebc81a 100644 (file)
@@ -188,7 +188,7 @@ var zoneCache = ipv6ZoneCache{
 }
 
 // update refreshes the network interface information if the cache was last
-// updated more than 1 minute ago, or if force is set. It returns whether the
+// updated more than 1 minute ago, or if force is set. It reports whether the
 // cache was updated.
 func (zc *ipv6ZoneCache) update(ift []Interface, force bool) (updated bool) {
        zc.Lock()
index d070604600131b63b5b713639d5ca80ebacfd81c..469abf764016bbbe2f0ac5671777dcf195048294 100644 (file)
@@ -7,7 +7,7 @@
 package os
 
 // blockUntilWaitable attempts to block until a call to p.Wait will
-// succeed immediately, and returns whether it has done so.
+// succeed immediately, and reports whether it has done so.
 // It does not actually call p.Wait.
 // This version is used on systems that do not implement waitid,
 // or where we have not implemented it yet.
index 891f242dacd140e00ef939c7719285cfbbdddf69..45bf649015fd77e3d72ed99153d8c0ee7497a8ce 100644 (file)
@@ -14,7 +14,7 @@ import (
 const _P_PID = 0
 
 // blockUntilWaitable attempts to block until a call to p.Wait will
-// succeed immediately, and returns whether it has done so.
+// succeed immediately, and reports whether it has done so.
 // It does not actually call p.Wait.
 func (p *Process) blockUntilWaitable() (bool, error) {
        var errno syscall.Errno
index 5a62b27f191f22c98634c30fd0d09919dc65fa44..946c085a500422ceab0ffc2a9f224d59bbe7ef5d 100644 (file)
@@ -18,7 +18,7 @@ import (
 const _P_PID = 1
 
 // blockUntilWaitable attempts to block until a call to p.Wait will
-// succeed immediately, and returns whether it has done so.
+// succeed immediately, and reports whether it has done so.
 // It does not actually call p.Wait.
 func (p *Process) blockUntilWaitable() (bool, error) {
        // The waitid system call expects a pointer to a siginfo_t,
index 78cde4aa09074552d28c31bce8c95926c68643d2..7095a6b4bd575d2688b4559859dbb5b3cdc0ae0e 100644 (file)
@@ -43,7 +43,7 @@ func normBase(path string) (string, error) {
        return syscall.UTF16ToString(data.FileName[:]), nil
 }
 
-// baseIsDotDot returns whether the last element of path is "..".
+// baseIsDotDot reports whether the last element of path is "..".
 // The given path should be 'Clean'-ed in advance.
 func baseIsDotDot(path string) bool {
        i := strings.LastIndexByte(path, Separator)
index ca31408b50726f0b2859b6627e0f474a96418d71..85b6c8289ab4e612d30f2c72e367a73802b26e42 100644 (file)
@@ -606,7 +606,7 @@ func cgoCheckUnknownPointer(p unsafe.Pointer, msg string) (base, i uintptr) {
        return
 }
 
-// cgoIsGoPointer returns whether the pointer is a Go pointer--a
+// cgoIsGoPointer reports whether the pointer is a Go pointer--a
 // pointer to Go memory. We only care about Go memory that might
 // contain pointers.
 //go:nosplit
@@ -629,7 +629,7 @@ func cgoIsGoPointer(p unsafe.Pointer) bool {
        return false
 }
 
-// cgoInRange returns whether p is between start and end.
+// cgoInRange reports whether p is between start and end.
 //go:nosplit
 //go:nowritebarrierrec
 func cgoInRange(p unsafe.Pointer, start, end uintptr) bool {
index 67d99900a2fbd044ec6385466410354d6c7e5868..2f00add83e43dab125c51d1397d3ee18967d0d4e 100644 (file)
@@ -242,7 +242,7 @@ func (s *mspan) nextFreeIndex() uintptr {
        return result
 }
 
-// isFree returns whether the index'th object in s is unallocated.
+// isFree reports whether the index'th object in s is unallocated.
 func (s *mspan) isFree(index uintptr) bool {
        if index < s.freeindex {
                return false
index 03c64c4b113752f14b2c21b73710d3d30e747029..86416caab5288c80cb830fb0e361e7377771132c 100644 (file)
@@ -558,7 +558,7 @@ func gcWakeAllAssists() {
 
 // gcParkAssist puts the current goroutine on the assist queue and parks.
 //
-// gcParkAssist returns whether the assist is now satisfied. If it
+// gcParkAssist reports whether the assist is now satisfied. If it
 // returns false, the caller must retry the assist.
 //
 //go:nowritebarrier
index 1baa096a49c80ae782340c55a940ec0cf26c8b64..9cad866df8c7f90560706c59fa3540182077af65 100644 (file)
@@ -55,7 +55,7 @@ func (p *Profile) FilterSamplesByName(focus, ignore, hide *regexp.Regexp) (fm, i
        return
 }
 
-// matchesName returns whether the function name or file in the
+// matchesName reports whether the function name or file in the
 // location matches the regular expression.
 func (loc *Location) matchesName(re *regexp.Regexp) bool {
        for _, ln := range loc.Line {
index b78eff8ff6c52bd98d33c204dae3581ee3bc7f00..409869fd1071e77ec780a70b0bb4d2581cbe3dc7 100644 (file)
@@ -4592,7 +4592,7 @@ func schedEnableUser(enable bool) {
        }
 }
 
-// schedEnabled returns whether gp should be scheduled. It returns
+// schedEnabled reports whether gp should be scheduled. It returns
 // false is scheduling of gp is disabled.
 func schedEnabled(gp *g) bool {
        if sched.disable.user {
index 2729c2ecf98a225e86fbf5d5de010833d25fd569..85be1bc64da0f0369983eca56566255b9fe59b4a 100644 (file)
@@ -110,7 +110,7 @@ func block() {
 //
 // selectgo returns the index of the chosen scase, which matches the
 // ordinal position of its respective select{recv,send,default} call.
-// Also, if the chosen scase was a receive operation, it returns whether
+// Also, if the chosen scase was a receive operation, it reports whether
 // a value was received.
 func selectgo(cas0 *scase, order0 *uint16, ncases int) (int, bool) {
        if debugSelect {
index 12a938c8c930707ce16d534406703798a7e88794..15f1799801921d2bb83f628b360beffaff5b66fa 100644 (file)
@@ -773,7 +773,7 @@ func unminitSignals() {
        }
 }
 
-// blockableSig returns whether sig may be blocked by the signal mask.
+// blockableSig reports whether sig may be blocked by the signal mask.
 // We never want to block the signals marked _SigUnblock;
 // these are the synchronous signals that turn into a Go panic.
 // In a Go program--not a c-archive/c-shared--we never want to block
index 0d5503a6f52a7f6d070719c2a295d24a24fb91f0..d4698e805c7c2bb06b0261346f29c3cd92abe956 100644 (file)
@@ -298,7 +298,7 @@ func round(n, a uintptr) uintptr {
        return (n + a - 1) &^ (a - 1)
 }
 
-// checkASM returns whether assembly runtime checks have passed.
+// checkASM reports whether assembly runtime checks have passed.
 func checkASM() bool
 
 func memequal_varlen(a, b unsafe.Pointer) bool
index d5a7d003fe2fc58a26dff8a653c195134c231a8f..82cb232dba95e515cb40243f819a4bad0fadd28f 100644 (file)
@@ -171,7 +171,7 @@ func (r *Region) End() {
        userRegion(r.id, regionEndCode, r.regionType)
 }
 
-// IsEnabled returns whether tracing is enabled.
+// IsEnabled reports whether tracing is enabled.
 // The information is advisory only. The tracing status
 // may have changed by the time this function returns.
 func IsEnabled() bool {
index 9d2f7f037c829ea030ffc5079c4fbd0a96605f55..0328fee4e640df6a771cfccffcde09fbf86f4065 100644 (file)
@@ -876,7 +876,7 @@ func isExportedRuntime(name string) bool {
        return len(name) > n && name[:n] == "runtime." && 'A' <= name[n] && name[n] <= 'Z'
 }
 
-// elideWrapperCalling returns whether a wrapper function that called
+// elideWrapperCalling reports whether a wrapper function that called
 // function "name" should be elided from stack traces.
 func elideWrapperCalling(name string) bool {
        // If the wrapper called a panic function instead of the
index 9827874beabcfb34450ec0b7b0a75aec15374048..71ba4ce4161b665c6af4574fc7a4fdc1d5588936 100644 (file)
@@ -280,7 +280,7 @@ func vdsoauxv(tag, val uintptr) {
        }
 }
 
-// vdsoMarker returns whether PC is on the VDSO page.
+// vdsoMarker reports whether PC is on the VDSO page.
 func inVDSOPage(pc uintptr) bool {
        for _, k := range vdsoSymbolKeys {
                if *k.ptr != 0 {
index 90f86dc373ad23e8b70f127c04676b43703761ae..8dd8cbc17e267212925c1c3d875dc6a11cc80acd 100644 (file)
@@ -230,7 +230,7 @@ func roundUp(n int) int {
        }
 }
 
-// run1 runs the first iteration of benchFunc. It returns whether more
+// run1 runs the first iteration of benchFunc. It reports whether more
 // iterations of this benchmarks should be run.
 func (b *B) run1() bool {
        if ctx := b.context; ctx != nil {
index 54c76f09e146701d101d94b0cd2905af78d162f6..7dffbfad5e47d6bba9b3fbf447fb8b58d283d181 100644 (file)
@@ -205,7 +205,7 @@ func (l *Location) lookupFirstZone() int {
        return 0
 }
 
-// firstZoneUsed returns whether the first zone is used by some
+// firstZoneUsed reports whether the first zone is used by some
 // transition.
 func (l *Location) firstZoneUsed() bool {
        for _, tx := range l.tx {