]> Cypherpunks repositories - gostls13.git/commitdiff
all: fix a large number of comments
authorcui fliter <imcusg@gmail.com>
Fri, 22 Mar 2024 15:31:44 +0000 (23:31 +0800)
committerGopher Robot <gobot@golang.org>
Tue, 26 Mar 2024 19:58:28 +0000 (19:58 +0000)
Partial typo corrections, following https://go.dev/wiki/Spelling

Change-Id: I2357906ff2ea04305c6357418e4e9556e20375d1
Reviewed-on: https://go-review.googlesource.com/c/go/+/573776
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Run-TryBot: shuang cui <imcusg@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>

31 files changed:
src/cmd/compile/internal/inline/inlheur/analyze.go
src/cmd/compile/internal/ssa/dom_test.go
src/cmd/compile/internal/ssa/passbm_test.go
src/cmd/compile/internal/test/pgo_inl_test.go
src/cmd/dist/supported_test.go
src/cmd/dist/test.go
src/cmd/go/internal/modindex/scan.go
src/cmd/go/internal/modinfo/info.go
src/cmd/go/internal/script/cmds.go
src/cmd/go/script_test.go
src/context/context.go
src/context/x_test.go
src/crypto/tls/conn.go
src/crypto/tls/handshake_server_test.go
src/crypto/x509/x509.go
src/encoding/xml/read_test.go
src/encoding/xml/xml_test.go
src/go/doc/comment/testdata/README.md
src/go/doc/comment/testdata_test.go
src/html/template/js.go
src/internal/fuzz/fuzz.go
src/internal/fuzz/worker.go
src/net/cgo_unix.go
src/net/http/transport_test.go
src/os/exec/exec.go
src/os/exec/exec_test.go
src/runtime/coverage/testsupport.go
src/runtime/netpoll_windows.go
src/testing/testing.go
test/typeparam/graph.go
test/typeparam/list2.go

index 1fb502ac2abe653c04ebd2710422dc4cc98a4403..9ed7d73af98222e784a6e41f0c68a7f5e3e94cc6 100644 (file)
@@ -338,7 +338,7 @@ func dumpFnPreamble(w io.Writer, funcInlHeur *fnInlHeur, ecst encodedCallSiteTab
        fmt.Fprintf(w, "%s// %s\n", funcInlHeur.props.ToString("// "), comDelimiter)
        data, err := json.Marshal(funcInlHeur.props)
        if err != nil {
-               return fmt.Errorf("marshall error %v\n", err)
+               return fmt.Errorf("marshal error %v\n", err)
        }
        fmt.Fprintf(w, "// %s\n", string(data))
        dumpCallSiteComments(w, funcInlHeur.cstab, ecst)
index fa517183c2e5a43ff8b8fd64972a670b5bbd7379..945b46fce4fedcbbb6cad90dd799198f1597e6df 100644 (file)
@@ -40,7 +40,7 @@ func genLinear(size int) []bloc {
        return blocs
 }
 
-// genLinear creates an array of blocks that alternate between
+// genFwdBack creates an array of blocks that alternate between
 // b_n -> [b_n+1], b_n -> [b_n+1, b_n-1] , b_n -> [b_n+1, b_n+2]
 func genFwdBack(size int) []bloc {
        var blocs []bloc
index 3fd3eb579bc0954fd1beeacecadd8b55c3e686b7..239d31a40b888f15b85734e4bd4e53c67ecb3b4d 100644 (file)
@@ -47,7 +47,7 @@ func benchFnPass(b *testing.B, fn passFunc, size int, bg blockGen) {
        }
 }
 
-// benchFnPass runs passFunc across a function with b.N blocks.
+// benchFnBlock runs passFunc across a function with b.N blocks.
 func benchFnBlock(b *testing.B, fn passFunc, bg blockGen) {
        b.ReportAllocs()
        c := testConfig(b)
index 7d665655d5746115e84d4b486e404e7b820a7625..0859431b029edf35b568c28f67f4cd276de504fc 100644 (file)
@@ -166,7 +166,7 @@ func TestPGOIntendedInlining(t *testing.T) {
        testPGOIntendedInlining(t, dir, profFile)
 }
 
-// TestPGOIntendedInlining tests that specific functions are inlined when PGO
+// TestPGOPreprocessInlining tests that specific functions are inlined when PGO
 // is applied to the exact source that was profiled.
 func TestPGOPreprocessInlining(t *testing.T) {
        wd, err := os.Getwd()
@@ -187,7 +187,7 @@ func TestPGOPreprocessInlining(t *testing.T) {
        testPGOIntendedInlining(t, dir, preProfFile)
 }
 
-// TestPGOIntendedInlining tests that specific functions are inlined when PGO
+// TestPGOIntendedInliningShiftedLines tests that specific functions are inlined when PGO
 // is applied to the modified source.
 func TestPGOIntendedInliningShiftedLines(t *testing.T) {
        wd, err := os.Getwd()
index 27c0b92514b3c7aca5382432566c157d8c8136b5..3c0564e63a05e3e76461b2bdb71756aa525606a4 100644 (file)
@@ -9,7 +9,7 @@ import (
        "testing"
 )
 
-// TestSupportedBuildModes tests that dist and the main tools agree on
+// TestSupported tests that dist and the main tools agree on
 // which build modes are supported for a given target. We do things
 // this way because the dist tool needs to be buildable directly by
 // the bootstrap compiler, and as such can't import internal packages.
index 81bf86b688d0a892a5320a84ed012a53a9c62564..6f4d23182ae2f76561141f54c02bb65b5aa41569 100644 (file)
@@ -1592,7 +1592,7 @@ func raceDetectorSupported(goos, goarch string) bool {
        }
 }
 
-// buildModeSupports is a copy of the function
+// buildModeSupported is a copy of the function
 // internal/platform.BuildModeSupported, which can't be used here
 // because cmd/dist can not import internal packages during bootstrap.
 func buildModeSupported(compiler, buildmode, goos, goarch string) bool {
index 6ca73e29f58e55a6b616ebb33cd2d287539bdbd2..2a2c3ea2c295ad501aa67a3b023db6108681252a 100644 (file)
@@ -104,7 +104,7 @@ type parseError struct {
 
 // parseErrorToString converts the error from parsing the file into a string
 // representation. A nil error is converted to an empty string, and all other
-// errors are converted to a JSON-marshalled parseError struct, with ErrorList
+// errors are converted to a JSON-marshaled parseError struct, with ErrorList
 // set for errors of type scanner.ErrorList, and ErrorString set to the error's
 // string representation for all other errors.
 func parseErrorToString(err error) string {
@@ -126,7 +126,7 @@ func parseErrorToString(err error) string {
 
 // parseErrorFromString converts a string produced by parseErrorToString back
 // to an error.  An empty string is converted to a nil error, and all
-// other strings are expected to be JSON-marshalled parseError structs.
+// other strings are expected to be JSON-marshaled parseError structs.
 // The two functions are meant to preserve the structure of an
 // error of type scanner.ErrorList in a round trip, but may not preserve the
 // structure of other errors.
index 336f99245aef4655077a0749f4d43e684e86e0f4..ee73c5e07b7fa95c0c9c8d42d1a93896532f8722 100644 (file)
@@ -43,7 +43,7 @@ type moduleErrorNoMethods ModuleError
 
 // UnmarshalJSON accepts both {"Err":"text"} and "text",
 // so that the output of go mod download -json can still
-// be unmarshalled into a ModulePublic during -reuse processing.
+// be unmarshaled into a ModulePublic during -reuse processing.
 func (e *ModuleError) UnmarshalJSON(data []byte) error {
        if len(data) > 0 && data[0] == '"' {
                return json.Unmarshal(data, &e.Err)
index ecd35ff8b122c19abda0a7e147a585237261d5f1..50c752c2cc0c502abd39749794ca1a96f63f673d 100644 (file)
@@ -916,7 +916,7 @@ func removeAll(dir string) error {
 }
 
 // Sleep sleeps for the given Go duration or until the script's context is
-// cancelled, whichever happens first.
+// canceled, whichever happens first.
 func Sleep() Cmd {
        return Command(
                CmdUsage{
index 0c494c0514dc5b3e81c6ab88fd55c9add1fb09b8..fa660bafc89a139c5605399ee4abc4752e188136 100644 (file)
@@ -180,7 +180,7 @@ func tbFromContext(ctx context.Context) (testing.TB, bool) {
        return t.(testing.TB), true
 }
 
-// initScriptState creates the initial directory structure in s for unpacking a
+// initScriptDirs creates the initial directory structure in s for unpacking a
 // cmd/go script.
 func initScriptDirs(t testing.TB, s *script.State) (telemetryDir string) {
        must := func(err error) {
index e95f553804fc677f776785f428361516f580630d..30adfe987d53cf2f08be331a18d4f4d399f78df3 100644 (file)
@@ -295,7 +295,7 @@ func Cause(c Context) error {
 }
 
 // AfterFunc arranges to call f in its own goroutine after ctx is done
-// (cancelled or timed out).
+// (canceled or timed out).
 // If ctx is already done, AfterFunc calls f immediately in its own goroutine.
 //
 // Multiple calls to AfterFunc on a context operate independently;
index e9b05762819c29a53beb3cacd769329896f031e8..2c66ed42b2f1510142d4ca845e3717e57848f119 100644 (file)
@@ -1064,7 +1064,7 @@ func TestAfterFuncNotCalledAfterStop(t *testing.T) {
        }
 }
 
-// This test verifies that cancelling a context does not block waiting for AfterFuncs to finish.
+// This test verifies that canceling a context does not block waiting for AfterFuncs to finish.
 func TestAfterFuncCalledAsynchronously(t *testing.T) {
        ctx, cancel := WithCancel(Background())
        donec := make(chan struct{})
index 0e4669866e5e982c0c12570c7a559e3ac3cd851e..30c5f00091029e577230c312e1b35414d0c87359 100644 (file)
@@ -1040,7 +1040,7 @@ func (c *Conn) writeRecordLocked(typ recordType, data []byte) (int, error) {
 }
 
 // writeHandshakeRecord writes a handshake message to the connection and updates
-// the record layer state. If transcript is non-nil the marshalled message is
+// the record layer state. If transcript is non-nil the marshaled message is
 // written to it.
 func (c *Conn) writeHandshakeRecord(msg handshakeMessage, transcript transcriptHash) (int, error) {
        c.out.Lock()
index 15db760716c3dfe7f7024264e99bda7e5d1903b0..ff0b479f0438c7c2a51c98e105856279fed140ee 100644 (file)
@@ -998,7 +998,7 @@ func TestHandshakeServerSNI(t *testing.T) {
        runServerTestTLS12(t, test)
 }
 
-// TestHandshakeServerSNICertForName is similar to TestHandshakeServerSNI, but
+// TestHandshakeServerSNIGetCertificate is similar to TestHandshakeServerSNI, but
 // tests the dynamic GetCertificate method
 func TestHandshakeServerSNIGetCertificate(t *testing.T) {
        config := testConfig.Clone()
index bbe11f79453b2092bb5138682e912f0e0fb78b76..3e26941573170d11d885751baeae3453e2814a8d 100644 (file)
@@ -1574,7 +1574,7 @@ var emptyASN1Subject = []byte{0x30, 0}
 // The PolicyIdentifier and Policies fields are both used to marshal certificate
 // policy OIDs. By default, only the PolicyIdentifier is marshaled, but if the
 // GODEBUG setting "x509usepolicies" has the value "1", the Policies field will
-// be marshalled instead of the PolicyIdentifier field. The Policies field can
+// be marshaled instead of the PolicyIdentifier field. The Policies field can
 // be used to marshal policy OIDs which have components that are larger than 31
 // bits.
 func CreateCertificate(rand io.Reader, template, parent *Certificate, pub, priv any) ([]byte, error) {
index ce9989429571312f5758eabb6e4408c3495b9e37..f0f7b31ccc73ff256d206468ad2412d015e9dadd 100644 (file)
@@ -1093,7 +1093,7 @@ func TestUnmarshalIntoNil(t *testing.T) {
        err := Unmarshal([]byte("<T><A>1</A></T>"), nilPointer)
 
        if err == nil {
-               t.Fatalf("no error in unmarshalling")
+               t.Fatalf("no error in unmarshaling")
        }
 
 }
index a6763fd547ddfcbef3a3b07cf1321667c528c00c..b2a06a7639702df28cc055fb116916c9fe7aeb08 100644 (file)
@@ -1091,10 +1091,10 @@ func TestIssue7113(t *testing.T) {
        }
 
        if a.XMLName.Space != structSpace {
-               t.Errorf("overidding with empty namespace: unmarshalling, got %s, want %s\n", a.XMLName.Space, structSpace)
+               t.Errorf("overidding with empty namespace: unmarshaling, got %s, want %s\n", a.XMLName.Space, structSpace)
        }
        if len(a.C.XMLName.Space) != 0 {
-               t.Fatalf("overidding with empty namespace: unmarshalling, got %s, want empty\n", a.C.XMLName.Space)
+               t.Fatalf("overidding with empty namespace: unmarshaling, got %s, want empty\n", a.C.XMLName.Space)
        }
 
        var b []byte
@@ -1106,7 +1106,7 @@ func TestIssue7113(t *testing.T) {
                t.Errorf("overidding with empty namespace: marshaling, got %s in C tag which should be empty\n", a.C.XMLName.Space)
        }
        if string(b) != xmlTest {
-               t.Fatalf("overidding with empty namespace: marshalling, got %s, want %s\n", b, xmlTest)
+               t.Fatalf("overidding with empty namespace: marshaling, got %s, want %s\n", b, xmlTest)
        }
        var c A
        err = Unmarshal(b, &c)
index d6f2c549605d2aae2eae1d3ba5ee3d5fce30da7e..ef6adfa922fb3f03b317670bfc74c36feccf1d0a 100644 (file)
@@ -24,7 +24,7 @@ The remaining files contain the expected output for the named format generated b
 “html” for Printer.HTML, “markdown” for Printer.Markdown, and “text” for Printer.Text.
 The format can also be “dump” for a textual dump of the raw data structures.
 
-The text before the `-- input --` line, if present, is JSON to be unmarshalled
+The text before the `-- input --` line, if present, is JSON to be unmarshaled
 to initialize a comment.Printer. For example, this test case sets the Printer's
 TextWidth field to 20:
 
index 0676d864b29419494da3f649220e20ee5a6d4034..740760c0483a53e7ffc509abd426b8de48df6a11 100644 (file)
@@ -57,7 +57,7 @@ func TestTestdata(t *testing.T) {
                        if len(a.Comment) > 0 {
                                err := json.Unmarshal(a.Comment, &pr)
                                if err != nil {
-                                       t.Fatalf("unmarshalling top json: %v", err)
+                                       t.Fatalf("unmarshaling top json: %v", err)
                                }
                        }
                        if len(a.Files) < 1 || a.Files[0].Name != "input" {
index d911ada26d3d94d2d94073ce76ee0e8394af051e..d1463dee149101418f7c1ccc85a61f7113e10073 100644 (file)
@@ -171,7 +171,7 @@ func jsValEscaper(args ...any) string {
        // cyclic data. This may be an unacceptable DoS risk.
        b, err := json.Marshal(a)
        if err != nil {
-               // While the standard JSON marshaller does not include user controlled
+               // While the standard JSON marshaler does not include user controlled
                // information in the error message, if a type has a MarshalJSON method,
                // the content of the error message is not guaranteed. Since we insert
                // the error into the template, as part of a comment, we attempt to
index fb4e1d37055eeb6adb75a94dc24661f17fd2ccdd..e406c8c400400aa9dda777969c8b39b659e286f4 100644 (file)
@@ -196,7 +196,7 @@ func CoordinateFuzzing(ctx context.Context, opts CoordinateFuzzingOpts) (err err
 
        // Main event loop.
        // Do not return until all workers have terminated. We avoid a deadlock by
-       // receiving messages from workers even after ctx is cancelled.
+       // receiving messages from workers even after ctx is canceled.
        activeWorkers := len(workers)
        statTicker := time.NewTicker(3 * time.Second)
        defer statTicker.Stop()
@@ -223,8 +223,8 @@ func CoordinateFuzzing(ctx context.Context, opts CoordinateFuzzingOpts) (err err
 
                select {
                case <-doneC:
-                       // Interrupted, cancelled, or timed out.
-                       // stop sets doneC to nil so we don't busy wait here.
+                       // Interrupted, canceled, or timed out.
+                       // stop sets doneC to nil, so we don't busy wait here.
                        stop(ctx.Err())
 
                case err := <-errC:
@@ -653,7 +653,7 @@ type coordinator struct {
 }
 
 func newCoordinator(opts CoordinateFuzzingOpts) (*coordinator, error) {
-       // Make sure all of the seed corpus has marshalled data.
+       // Make sure all the seed corpus has marshaled data.
        for i := range opts.Seed {
                if opts.Seed[i].Data == nil && opts.Seed[i].Values != nil {
                        opts.Seed[i].Data = marshalCorpusFile(opts.Seed[i].Values...)
index c9526709951fee4ab578fd719a505fbaa46c0796..e8a74217789189c28bbef81579fe5f9c9924dd34 100644 (file)
@@ -89,7 +89,7 @@ func (w *worker) cleanup() error {
 
 // coordinate runs the test binary to perform fuzzing.
 //
-// coordinate loops until ctx is cancelled or a fatal error is encountered.
+// coordinate loops until ctx is canceled or a fatal error is encountered.
 // If a test process terminates unexpectedly while fuzzing, coordinate will
 // attempt to restart and continue unless the termination can be attributed
 // to an interruption (from a timer or the user).
@@ -1026,7 +1026,7 @@ func (wc *workerClient) minimize(ctx context.Context, entryIn CorpusEntry, args
                                return entryIn, minimizeResponse{}, retErr
                        }
                        // An unrecoverable error occurred during minimization. mem now
-                       // holds the raw, unmarshalled bytes of entryIn.Values[i] that
+                       // holds the raw, unmarshaled bytes of entryIn.Values[i] that
                        // caused the error.
                        switch entryOut.Values[i].(type) {
                        case string:
@@ -1148,7 +1148,7 @@ func (wc *workerClient) ping(ctx context.Context) error {
 }
 
 // callLocked sends an RPC from the coordinator to the worker process and waits
-// for the response. The callLocked may be cancelled with ctx.
+// for the response. The callLocked may be canceled with ctx.
 func (wc *workerClient) callLocked(ctx context.Context, c call, resp any) (err error) {
        enc := json.NewEncoder(wc.fuzzIn)
        dec := json.NewDecoder(&contextReader{ctx: ctx, r: wc.fuzzOut})
@@ -1158,7 +1158,7 @@ func (wc *workerClient) callLocked(ctx context.Context, c call, resp any) (err e
        return dec.Decode(resp)
 }
 
-// contextReader wraps a Reader with a Context. If the context is cancelled
+// contextReader wraps a Reader with a Context. If the context is canceled
 // while the underlying reader is blocked, Read returns immediately.
 //
 // This is useful for reading from a pipe. Closing a pipe file descriptor does
index 0f62fdeb11307e590e5de6f6aa226f251b91cee7..1858e495d22238c8c2a45b2bac8f0d315098a729 100644 (file)
@@ -42,7 +42,7 @@ func (eai addrinfoErrno) isAddrinfoErrno() {}
 // context is cancellable. It is intended for use with calls that don't support context
 // cancellation (cgo, syscalls). blocking func may still be running after this function finishes.
 // For the duration of the execution of the blocking function, the thread is 'acquired' using [acquireThread],
-// blocking might not be executed when the context gets cancelled early.
+// blocking might not be executed when the context gets canceled early.
 func doBlockingWithCtx[T any](ctx context.Context, lookupName string, blocking func() (T, error)) (T, error) {
        if err := acquireThread(ctx); err != nil {
                var zero T
index 744bbf1ad1dcfbed94f7ac0c846bcff33ae5eb95..e8baa486a4fb1edc51c06e0612f6ac49ed42574b 100644 (file)
@@ -754,7 +754,7 @@ func testTransportMaxConnsPerHostDialCancellation(t *testing.T, mode testMode) {
        tr := c.Transport.(*Transport)
        tr.MaxConnsPerHost = 1
 
-       // This request is cancelled when dial is queued, which preempts dialing.
+       // This request is canceled when dial is queued, which preempts dialing.
        ctx, cancel := context.WithCancel(context.Background())
        defer cancel()
        SetPendingDialHooks(cancel, nil)
index ee57ac477137f652e534c4e35b9bab0cacccb459..35e4e7e792fdbc353b30a2e5128a0b616a6cc005 100644 (file)
@@ -777,7 +777,7 @@ func (c *Cmd) watchCtx(resultc chan<- ctxResult) {
                } else if errors.Is(interruptErr, os.ErrProcessDone) {
                        // The process already finished: we just didn't notice it yet.
                        // (Perhaps c.Wait hadn't been called, or perhaps it happened to race with
-                       // c.ctx being cancelled.) Don't inject a needless error.
+                       // c.ctx being canceled.) Don't inject a needless error.
                } else {
                        err = wrappedError{
                                prefix: "exec: canceling Cmd",
index c4b89e019924d29999c1aad47018ccbad26c7bf1..c749de99db69e1f51ff9abe705eef50408cded95 100644 (file)
@@ -1366,7 +1366,7 @@ func TestWaitInterrupt(t *testing.T) {
        })
 
        // With a very long WaitDelay and no Cancel function, we should wait for the
-       // process to exit even if the command's Context is cancelled.
+       // process to exit even if the command's Context is canceled.
        t.Run("WaitDelay", func(t *testing.T) {
                if runtime.GOOS == "windows" {
                        t.Skipf("skipping: os.Interrupt is not implemented on Windows")
@@ -1404,7 +1404,7 @@ func TestWaitInterrupt(t *testing.T) {
                }
        })
 
-       // If the context is cancelled and the Cancel function sends os.Kill,
+       // If the context is canceled and the Cancel function sends os.Kill,
        // the process should be terminated immediately, and its output
        // pipes should be closed (causing Wait to return) after WaitDelay
        // even if a child process is still writing to them.
index a12b8589f0dd4618a29924c26ad3b29e113f4592..4b00f3a0f7138cc12a0750fb82ce95916fb9e2f0 100644 (file)
@@ -247,7 +247,7 @@ type pkfunc struct {
 }
 
 func (ts *tstate) readAuxMetaFiles(metafiles string, importpaths map[string]struct{}) error {
-       // Unmarshall the information on available aux metafiles into
+       // Unmarshal the information on available aux metafiles into
        // a MetaFileCollection struct.
        var mfc coverage.MetaFileCollection
        data, err := os.ReadFile(metafiles)
index 3f704294972964c6258174d5e7adfadd4845a79d..c3c10af723794f257e31dc47a6b17d98efdb1bc5 100644 (file)
@@ -249,7 +249,7 @@ func netpollQueueTimer(delay int64) (signaled bool) {
        // A wait completion packet can only be associated with one timer at a time,
        // so we need to cancel the previous one if it exists. This wouldn't be necessary
        // if the poller would only be woken up by the timer, in which case the association
-       // would be automatically cancelled, but it can also be woken up by other events,
+       // would be automatically canceled, but it can also be woken up by other events,
        // such as a netpollBreak, so we can get to this point with a timer that hasn't
        // expired yet. In this case, the completion packet can still be picked up by
        // another thread, so defer the cancellation until it is really necessary.
@@ -271,7 +271,7 @@ func netpollQueueTimer(delay int64) (signaled bool) {
                        throw("runtime: netpoll failed")
                }
        case STATUS_PENDING:
-               // STATUS_PENDING is returned if the wait operation can't be cancelled yet.
+               // STATUS_PENDING is returned if the wait operation can't be canceled yet.
                // This can happen if this thread was woken up by another event, such as a netpollBreak,
                // and the timer expired just while calling NtCancelWaitCompletionPacket, in which case
                // this call fails to cancel the association to avoid a race condition.
index 5c06aea5f8fe6b8b0d18290a87a61da6d239bd9b..9c1325a6097bd50f590ce876c21c9fc7e5062ded 100644 (file)
@@ -1306,7 +1306,7 @@ func (c *common) Setenv(key, value string) {
        }
 }
 
-// panicHanding controls the panic handling used by runCleanup.
+// panicHandling controls the panic handling used by runCleanup.
 type panicHandling int
 
 const (
index 5cd1faa76f523d7708df04c34f32093308281d4b..544318647b9e449f167e78b41ebcbbe5e62d4920 100644 (file)
@@ -11,7 +11,7 @@ import (
        "fmt"
 )
 
-// _Equal reports whether two slices are equal: the same length and all
+// _SliceEqual reports whether two slices are equal: the same length and all
 // elements equal. All floating point NaNs are considered equal.
 func _SliceEqual[Elem comparable](s1, s2 []Elem) bool {
        if len(s1) != len(s2) {
@@ -42,7 +42,7 @@ type _NodeC[_Edge any] interface {
        Edges() []_Edge
 }
 
-// Edgec is the constraints on an edge in a graph, given the _Node type.
+// _EdgeC is the constraints on an edge in a graph, given the _Node type.
 type _EdgeC[_Node any] interface {
        comparable
        Nodes() (a, b _Node)
@@ -153,6 +153,7 @@ func (m mazeRoom) Edges() []mazeEdge {
 }
 
 // Nodes returns the rooms connected by an edge.
+//
 //go:noinline
 func (e mazeEdge) Nodes() (mazeRoom, mazeRoom) {
        m1, ok := zork[e.from]
index 111ac787e509d047dc7d612c47fb32691a88b9ec..0b976f0b18db6f2ed744da6a8d3fbd80ffde627a 100644 (file)
@@ -14,7 +14,7 @@ import (
        "strconv"
 )
 
-// Element is an element of a linked list.
+// _Element is an element of a linked list.
 type _Element[T any] struct {
        // Next and previous pointers in the doubly-linked list of elements.
        // To simplify the implementation, internally a list l is implemented