From 0507994f96964044a8bb3a9883990eb75f3bca63 Mon Sep 17 00:00:00 2001 From: Andreas Deininger Date: Wed, 9 Nov 2022 00:22:16 +0100 Subject: [PATCH] Fixing typos. --- internal/fetch/fetchdata_test.go | 2 +- internal/frontend/latest_version_test.go | 2 +- internal/frontend/search_test.go | 2 +- internal/frontend/versions.go | 2 +- .../testdata/v1.12.5/src/context/context.go | 22 +++++++++---------- .../v1.12.5/src/context/context_test.go | 4 ++-- .../v1.12.5/src/context/example_test.go | 2 +- internal/symbol/stdlib.go | 2 +- internal/worker/fetch_test.go | 2 +- static/shared/footer/footer.tmpl | 2 +- static/shared/modal/modal.md | 2 +- static/shared/playground/playground.test.ts | 2 +- static/shared/shared.css | 2 +- static/shared/table/table.ts | 2 +- 14 files changed, 25 insertions(+), 25 deletions(-) diff --git a/internal/fetch/fetchdata_test.go b/internal/fetch/fetchdata_test.go index f3d5268bb..e8d880793 100644 --- a/internal/fetch/fetchdata_test.go +++ b/internal/fetch/fetchdata_test.go @@ -1385,7 +1385,7 @@ var moduleStd = &testModule{ { GOOS: internal.All, GOARCH: internal.All, - Synopsis: "Package context defines the Context type, which carries deadlines, cancelation signals, and other request-scoped values across API boundaries and between processes.", + Synopsis: "Package context defines the Context type, which carries deadlines, cancellation signals, and other request-scoped values across API boundaries and between processes.", API: []*internal.Symbol{ { SymbolMeta: internal.SymbolMeta{ diff --git a/internal/frontend/latest_version_test.go b/internal/frontend/latest_version_test.go index 43829384e..f72ce25fe 100644 --- a/internal/frontend/latest_version_test.go +++ b/internal/frontend/latest_version_test.go @@ -53,7 +53,7 @@ func TestLatestMinorVersion(t *testing.T) { name: "module does not exist", fullPath: "github.com/mymodule/doesnotexist", modulePath: internal.UnknownModulePath, - wantErr: fmt.Errorf("error while retriving minor version"), + wantErr: fmt.Errorf("error while retrieving minor version"), }, } ctx := context.Background() diff --git a/internal/frontend/search_test.go b/internal/frontend/search_test.go index 0b5b2e4df..280ea3cfe 100644 --- a/internal/frontend/search_test.go +++ b/internal/frontend/search_test.go @@ -500,7 +500,7 @@ func TestNewSearchResult(t *testing.T) { got := newSearchResult(&test.in, false, pr) test.want.CommitTime = "unknown" if diff := cmp.Diff(&test.want, got); diff != "" { - t.Errorf("mimatch (-want, +got):\n%s", diff) + t.Errorf("mismatch (-want, +got):\n%s", diff) } }) } diff --git a/internal/frontend/versions.go b/internal/frontend/versions.go index e9e6840c0..5af86c4f3 100644 --- a/internal/frontend/versions.go +++ b/internal/frontend/versions.go @@ -156,7 +156,7 @@ func buildVersionDetails(ctx context.Context, currentModulePath, packagePath str for _, mi := range modInfos { // Try to resolve the most appropriate major version for this version. If // we detect a +incompatible version (when the path version does not match - // the sematic version), we prefer the path version. + // the semantic version), we prefer the path version. major := semver.Major(mi.Version) if mi.ModulePath == stdlib.ModulePath { var err error diff --git a/internal/stdlib/testdata/v1.12.5/src/context/context.go b/internal/stdlib/testdata/v1.12.5/src/context/context.go index 21a40d594..372951540 100644 --- a/internal/stdlib/testdata/v1.12.5/src/context/context.go +++ b/internal/stdlib/testdata/v1.12.5/src/context/context.go @@ -3,7 +3,7 @@ // license that can be found in the LICENSE file. // Package context defines the Context type, which carries deadlines, -// cancelation signals, and other request-scoped values across API boundaries +// cancellation signals, and other request-scoped values across API boundaries // and between processes. // // Incoming requests to a server should create a Context, and outgoing @@ -30,9 +30,9 @@ // explicitly to each function that needs it. The Context should be the first // parameter, typically named ctx: // -// func DoSomething(ctx context.Context, arg Arg) error { -// // ... use ctx ... -// } +// func DoSomething(ctx context.Context, arg Arg) error { +// // ... use ctx ... +// } // // Do not pass a nil Context, even if a function permits it. Pass context.TODO // if you are unsure about which Context to use. @@ -55,7 +55,7 @@ import ( "time" ) -// A Context carries a deadline, a cancelation signal, and other values across +// A Context carries a deadline, a cancellation signal, and other values across // API boundaries. // // Context's methods may be called by multiple goroutines simultaneously. @@ -93,7 +93,7 @@ type Context interface { // } // // See https://blog.golang.org/pipelines for more examples of how to use - // a Done channel for cancelation. + // a Done channel for cancellation. Done() <-chan struct{} // If Done is not yet closed, Err returns nil. @@ -442,11 +442,11 @@ func (c *timerCtx) cancel(removeFromParent bool, err error) { // Canceling this context releases resources associated with it, so code should // call cancel as soon as the operations running in this Context complete: // -// func slowOperationWithTimeout(ctx context.Context) (Result, error) { -// ctx, cancel := context.WithTimeout(ctx, 100*time.Millisecond) -// defer cancel() // releases resources if slowOperation completes before timeout elapses -// return slowOperation(ctx) -// } +// func slowOperationWithTimeout(ctx context.Context) (Result, error) { +// ctx, cancel := context.WithTimeout(ctx, 100*time.Millisecond) +// defer cancel() // releases resources if slowOperation completes before timeout elapses +// return slowOperation(ctx) +// } func WithTimeout(parent Context, timeout time.Duration) (Context, CancelFunc) { return WithDeadline(parent, time.Now().Add(timeout)) } diff --git a/internal/stdlib/testdata/v1.12.5/src/context/context_test.go b/internal/stdlib/testdata/v1.12.5/src/context/context_test.go index 0b6ca7426..23bd715d0 100644 --- a/internal/stdlib/testdata/v1.12.5/src/context/context_test.go +++ b/internal/stdlib/testdata/v1.12.5/src/context/context_test.go @@ -94,7 +94,7 @@ func XTestWithCancel(t testingT) { } cancel() - time.Sleep(100 * time.Millisecond) // let cancelation propagate + time.Sleep(100 * time.Millisecond) // let cancellation propagate for i, c := range contexts { select { @@ -306,7 +306,7 @@ func XTestCanceledTimeout(t testingT) { o := otherContext{c} c, cancel := WithTimeout(o, 2*time.Second) cancel() - time.Sleep(100 * time.Millisecond) // let cancelation propagate + time.Sleep(100 * time.Millisecond) // let cancellation propagate select { case <-c.Done(): default: diff --git a/internal/stdlib/testdata/v1.12.5/src/context/example_test.go b/internal/stdlib/testdata/v1.12.5/src/context/example_test.go index 2b28b5770..b91a8acef 100644 --- a/internal/stdlib/testdata/v1.12.5/src/context/example_test.go +++ b/internal/stdlib/testdata/v1.12.5/src/context/example_test.go @@ -59,7 +59,7 @@ func ExampleWithDeadline() { ctx, cancel := context.WithDeadline(context.Background(), d) // Even though ctx will be expired, it is good practice to call its - // cancelation function in any case. Failure to do so may keep the + // cancellation function in any case. Failure to do so may keep the // context and its parent alive longer than necessary. defer cancel() diff --git a/internal/symbol/stdlib.go b/internal/symbol/stdlib.go index 485c8edb7..573dd9b3c 100644 --- a/internal/symbol/stdlib.go +++ b/internal/symbol/stdlib.go @@ -107,7 +107,7 @@ var pathToEmbeddedMethods = map[string]map[string]string{ // Embedded https://pkg.go.dev/debug/macho#File.Segment "FatArch.Segment": "v1.3.0", // https://pkg.go.dev/debug/macho@go1.10#Rpath - // Embeddded https://pkg.go.dev/debug/macho#LoadBytes.Raw + // Embedded https://pkg.go.dev/debug/macho#LoadBytes.Raw "Rpath.Raw": "v1.10.0", }, "debug/plan9obj": { diff --git a/internal/worker/fetch_test.go b/internal/worker/fetch_test.go index 183c69de6..919ad56de 100644 --- a/internal/worker/fetch_test.go +++ b/internal/worker/fetch_test.go @@ -180,7 +180,7 @@ func TestFetchAndUpdateState(t *testing.T) { }, NumImports: 5, Documentation: []*internal.Documentation{{ - Synopsis: "Package context defines the Context type, which carries deadlines, cancelation signals, and other request-scoped values across API boundaries and between processes.", + Synopsis: "Package context defines the Context type, which carries deadlines, cancellation signals, and other request-scoped values across API boundaries and between processes.", GOOS: "linux", GOARCH: "amd64", }}, diff --git a/static/shared/footer/footer.tmpl b/static/shared/footer/footer.tmpl index 032d48779..d24e9b034 100644 --- a/static/shared/footer/footer.tmpl +++ b/static/shared/footer/footer.tmpl @@ -127,7 +127,7 @@ Dark theme Light theme - diff --git a/static/shared/modal/modal.md b/static/shared/modal/modal.md index cd1f8d413..e49dd5616 100644 --- a/static/shared/modal/modal.md +++ b/static/shared/modal/modal.md @@ -2,7 +2,7 @@ --- -The size modifer class is optional. The base modal will grow to fit the inner content. +The size modifier class is optional. The base modal will grow to fit the inner content. ### Small {#modal-small} diff --git a/static/shared/playground/playground.test.ts b/static/shared/playground/playground.test.ts index 60ca821a1..5223f31f6 100644 --- a/static/shared/playground/playground.test.ts +++ b/static/shared/playground/playground.test.ts @@ -109,7 +109,7 @@ require example v1 expect(window.open).toHaveBeenCalledWith('https://play.golang.org/p/abcdefg'); }); - it('replaces textarea with formated code after pressing format', async () => { + it('replaces textarea with formatted code after pressing format', async () => { mocked(window.fetch).mockResolvedValue({ json: () => Promise.resolve({ diff --git a/static/shared/shared.css b/static/shared/shared.css index 79c43df2d..6e45d40a3 100644 --- a/static/shared/shared.css +++ b/static/shared/shared.css @@ -76,7 +76,7 @@ body { min-width: 23.5rem; /** - * This is used to programatically detect whether overflow needs to be altered + * This is used to programmatically detect whether overflow needs to be altered * to prevent jitter when focusing within fixed elements on iOS. * It also must be set to 'touch' for the fix to work. */ diff --git a/static/shared/table/table.ts b/static/shared/table/table.ts index 7675b65cc..98ec014d8 100644 --- a/static/shared/table/table.ts +++ b/static/shared/table/table.ts @@ -7,7 +7,7 @@ /** * Controller for a table element with expandable rows. Adds event listeners to - * a toggle within a table row that controls visiblity of additional related + * a toggle within a table row that controls visibility of additional related * rows in the table. * * @example