From 51be3c341c2f1a2295d0ed22615d80581e86742c Mon Sep 17 00:00:00 2001 From: Kian-Meng Ang Date: Mon, 10 Mar 2025 09:01:38 +0800 Subject: docs(fix): fix typos (#2344) * docs(fix): fix typos Found via `codespell -L fom,fo,wil,nd,wit` and `typos --hidden --format brief` * docs(fix): regenerate docs Signed-off-by: Dave Henderson --------- Signed-off-by: Dave Henderson Co-authored-by: Dave Henderson --- internal/cidr/cidr.go | 2 +- internal/funcs/file_test.go | 2 +- internal/funcs/semver_test.go | 2 +- internal/iohelpers/write_test.go | 2 +- internal/urlhelpers/urlhelpers_test.go | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'internal') diff --git a/internal/cidr/cidr.go b/internal/cidr/cidr.go index 49068f75..de67b16c 100644 --- a/internal/cidr/cidr.go +++ b/internal/cidr/cidr.go @@ -122,7 +122,7 @@ func PreviousSubnet(network netip.Prefix, prefixLen int) (netip.Prefix, bool) { // NextSubnet returns the next available subnet of the desired mask size // starting for the maximum IP of the offset subnet -// If the IP exceeds the maxium IP then the second return value is true +// If the IP exceeds the maximum IP then the second return value is true func NextSubnet(network netip.Prefix, prefixLen int) (netip.Prefix, bool) { currentLast := netipx.PrefixLastIP(network) diff --git a/internal/funcs/file_test.go b/internal/funcs/file_test.go index e64836ba..24fbe6f1 100644 --- a/internal/funcs/file_test.go +++ b/internal/funcs/file_test.go @@ -160,7 +160,7 @@ func TestWrite(t *testing.T) { require.NoError(t, err) assert.Equal(t, "truncate", string(out)) - foopath = filepath.Join(newwd, "nonexistant", "subdir", "foo") + foopath = filepath.Join(newwd, "nonexistent", "subdir", "foo") _, err = f.Write(foopath, "Hello subdirranean world!") require.NoError(t, err) diff --git a/internal/funcs/semver_test.go b/internal/funcs/semver_test.go index 0d52a955..86ba21f5 100644 --- a/internal/funcs/semver_test.go +++ b/internal/funcs/semver_test.go @@ -17,7 +17,7 @@ func TestSemverFuncs_MatchConstraint(t *testing.T) { wantErr bool }{ { - name: "mached constraint", + name: "matched constraint", constraint: ">=1.0.0", in: "v1.1.1", want: true, diff --git a/internal/iohelpers/write_test.go b/internal/iohelpers/write_test.go index 28b3fd85..8d15f0b6 100644 --- a/internal/iohelpers/write_test.go +++ b/internal/iohelpers/write_test.go @@ -61,7 +61,7 @@ func TestWrite(t *testing.T) { require.NoError(t, err) assert.Equal(t, "truncate", string(out)) - foopath = filepath.Join(newwd, "nonexistant", "subdir", "foo") + foopath = filepath.Join(newwd, "nonexistent", "subdir", "foo") err = iohelpers.WriteFile(fsys, foopath, []byte("Hello subdirranean world!")) require.NoError(t, err) diff --git a/internal/urlhelpers/urlhelpers_test.go b/internal/urlhelpers/urlhelpers_test.go index 9a0df386..2065e7bb 100644 --- a/internal/urlhelpers/urlhelpers_test.go +++ b/internal/urlhelpers/urlhelpers_test.go @@ -29,7 +29,7 @@ func TestParseSourceURL(t *testing.T) { require.NoError(t, err) assert.EqualValues(t, expected, u) - // behviour change in v4 - return relative if it's relative + // behaviour change in v4 - return relative if it's relative expected = &url.URL{Path: "./foo/bar.json"} u, err = ParseSourceURL("./foo/bar.json") require.NoError(t, err) -- cgit v1.2.3