From 4bc25af05342efc99e380d56f587ba55f6437b3d Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Sun, 3 Apr 2022 22:29:36 -0400 Subject: [PATCH] *.go: spelling typos Signed-off-by: Vincent Batts --- check_test.go | 2 +- cmd/gomtree/main.go | 4 ++-- compare_test.go | 2 +- keywords.go | 4 ++-- keywords_linux_test.go | 3 ++- update_linux_test.go | 2 +- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/check_test.go b/check_test.go index a8dcb38..1b10d9e 100644 --- a/check_test.go +++ b/check_test.go @@ -9,7 +9,7 @@ import ( "time" ) -// simple walk of current directory, and imediately check it. +// simple walk of current directory, and immediately check it. // may not be parallelizable. func TestCheck(t *testing.T) { dh, err := Walk(".", nil, append(DefaultKeywords, []Keyword{"sha1", "xattr"}...), nil) diff --git a/cmd/gomtree/main.go b/cmd/gomtree/main.go index 13d1920..42bc286 100644 --- a/cmd/gomtree/main.go +++ b/cmd/gomtree/main.go @@ -279,7 +279,7 @@ func app() error { // unsafe IMO. for _, diff := range res { if diff.Type() == mtree.Modified { - return fmt.Errorf("mainfest validation failed") + return fmt.Errorf("manifest validation failed") } } } @@ -337,7 +337,7 @@ func app() error { // unsafe IMO. for _, diff := range res { if diff.Type() == mtree.Modified { - return fmt.Errorf("mainfest validation failed") + return fmt.Errorf("manifest validation failed") } } } diff --git a/compare_test.go b/compare_test.go index 2a8e791..8953c1e 100644 --- a/compare_test.go +++ b/compare_test.go @@ -12,7 +12,7 @@ import ( "time" ) -// simple walk of current directory, and imediately check it. +// simple walk of current directory, and immediately check it. // may not be parallelizable. func TestCompare(t *testing.T) { old, err := Walk(".", nil, append(DefaultKeywords, "sha1"), nil) diff --git a/keywords.go b/keywords.go index 4e9c361..9adb1fd 100644 --- a/keywords.go +++ b/keywords.go @@ -18,7 +18,7 @@ type Keyword string // Prefix is the portion of the keyword before a first "." (if present). // -// Primarly for the xattr use-case, where the keyword `xattr.security.selinux` would have a Suffix of `security.selinux`. +// Primarily for the xattr use-case, where the keyword `xattr.security.selinux` would have a Suffix of `security.selinux`. func (k Keyword) Prefix() Keyword { if strings.Contains(string(k), ".") { return Keyword(strings.SplitN(string(k), ".", 2)[0]) @@ -29,7 +29,7 @@ func (k Keyword) Prefix() Keyword { // Suffix is the portion of the keyword after a first ".". // This is an option feature. // -// Primarly for the xattr use-case, where the keyword `xattr.security.selinux` would have a Suffix of `security.selinux`. +// Primarily for the xattr use-case, where the keyword `xattr.security.selinux` would have a Suffix of `security.selinux`. func (k Keyword) Suffix() string { if strings.Contains(string(k), ".") { return strings.SplitN(string(k), ".", 2)[1] diff --git a/keywords_linux_test.go b/keywords_linux_test.go index 3f989f8..394b8ce 100644 --- a/keywords_linux_test.go +++ b/keywords_linux_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package mtree @@ -15,7 +16,7 @@ import ( func TestXattr(t *testing.T) { testDir, present := os.LookupEnv("MTREE_TESTDIR") if present == false { - // a bit dirty to create/destory a directory in cwd, + // a bit dirty to create/destroy a directory in cwd, // but often /tmp is mounted tmpfs and doesn't support // xattrs testDir = "." diff --git a/update_linux_test.go b/update_linux_test.go index 42254a8..e721d8f 100644 --- a/update_linux_test.go +++ b/update_linux_test.go @@ -17,7 +17,7 @@ func init() { func TestXattrUpdate(t *testing.T) { content := []byte("I know half of you half as well as I ought to") - // a bit dirty to create/destory a directory in cwd, but often /tmp is + // a bit dirty to create/destroy a directory in cwd, but often /tmp is // mounted tmpfs and doesn't support xattrs dir, err := ioutil.TempDir(".", "test.xattr.restore.") if err != nil {