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:
parent
e1f0f056c7
commit
4bc25af053
6 changed files with 9 additions and 8 deletions
|
@ -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)
|
||||
|
|
|
@ -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")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -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 = "."
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue