summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorKian-Meng Ang <kianmeng.ang@gmail.com>2025-03-10 09:01:38 +0800
committerGitHub <noreply@github.com>2025-03-09 21:01:38 -0400
commit51be3c341c2f1a2295d0ed22615d80581e86742c (patch)
treee0b6f73756137c00fb55960c378e9d607add64b0 /internal
parenta378c6d544ad43143939e2b247751279abec8019 (diff)
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 <dhenderson@gmail.com> --------- Signed-off-by: Dave Henderson <dhenderson@gmail.com> Co-authored-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'internal')
-rw-r--r--internal/cidr/cidr.go2
-rw-r--r--internal/funcs/file_test.go2
-rw-r--r--internal/funcs/semver_test.go2
-rw-r--r--internal/iohelpers/write_test.go2
-rw-r--r--internal/urlhelpers/urlhelpers_test.go2
5 files changed, 5 insertions, 5 deletions
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)