1
0
Fork 0
mirror of https://github.com/vbatts/go-mtree.git synced 2024-11-22 00:15:39 +00:00

*.go: spelling typos

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2022-04-03 22:29:36 -04:00
parent e1f0f056c7
commit 4bc25af053
Signed by: vbatts
GPG key ID: 10937E57733F1362
6 changed files with 9 additions and 8 deletions

View file

@ -9,7 +9,7 @@ import (
"time" "time"
) )
// simple walk of current directory, and imediately check it. // simple walk of current directory, and immediately check it.
// may not be parallelizable. // may not be parallelizable.
func TestCheck(t *testing.T) { func TestCheck(t *testing.T) {
dh, err := Walk(".", nil, append(DefaultKeywords, []Keyword{"sha1", "xattr"}...), nil) dh, err := Walk(".", nil, append(DefaultKeywords, []Keyword{"sha1", "xattr"}...), nil)

View file

@ -279,7 +279,7 @@ func app() error {
// unsafe IMO. // unsafe IMO.
for _, diff := range res { for _, diff := range res {
if diff.Type() == mtree.Modified { 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. // unsafe IMO.
for _, diff := range res { for _, diff := range res {
if diff.Type() == mtree.Modified { if diff.Type() == mtree.Modified {
return fmt.Errorf("mainfest validation failed") return fmt.Errorf("manifest validation failed")
} }
} }
} }

View file

@ -12,7 +12,7 @@ import (
"time" "time"
) )
// simple walk of current directory, and imediately check it. // simple walk of current directory, and immediately check it.
// may not be parallelizable. // may not be parallelizable.
func TestCompare(t *testing.T) { func TestCompare(t *testing.T) {
old, err := Walk(".", nil, append(DefaultKeywords, "sha1"), nil) old, err := Walk(".", nil, append(DefaultKeywords, "sha1"), nil)

View file

@ -18,7 +18,7 @@ type Keyword string
// Prefix is the portion of the keyword before a first "." (if present). // 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 { func (k Keyword) Prefix() Keyword {
if strings.Contains(string(k), ".") { if strings.Contains(string(k), ".") {
return Keyword(strings.SplitN(string(k), ".", 2)[0]) 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 ".". // Suffix is the portion of the keyword after a first ".".
// This is an option feature. // 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 { func (k Keyword) Suffix() string {
if strings.Contains(string(k), ".") { if strings.Contains(string(k), ".") {
return strings.SplitN(string(k), ".", 2)[1] return strings.SplitN(string(k), ".", 2)[1]

View file

@ -1,3 +1,4 @@
//go:build linux
// +build linux // +build linux
package mtree package mtree
@ -15,7 +16,7 @@ import (
func TestXattr(t *testing.T) { func TestXattr(t *testing.T) {
testDir, present := os.LookupEnv("MTREE_TESTDIR") testDir, present := os.LookupEnv("MTREE_TESTDIR")
if present == false { 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 // but often /tmp is mounted tmpfs and doesn't support
// xattrs // xattrs
testDir = "." testDir = "."

View file

@ -17,7 +17,7 @@ func init() {
func TestXattrUpdate(t *testing.T) { func TestXattrUpdate(t *testing.T) {
content := []byte("I know half of you half as well as I ought to") 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 // mounted tmpfs and doesn't support xattrs
dir, err := ioutil.TempDir(".", "test.xattr.restore.") dir, err := ioutil.TempDir(".", "test.xattr.restore.")
if err != nil { if err != nil {