Skip to content

Commit

Permalink
fix spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
srerickson committed Oct 31, 2023
1 parent 5793092 commit f728e5f
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion digestmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func (m DigestMap) PathMap() map[string]string {
return paths
}

// PathMapValid is like PathMap, except it retuns an error if it encounters
// PathMapValid is like PathMap, except it returns an error if it encounters
// invalid path names or if the same path appears multiple times.
func (m DigestMap) PathMapValid() (map[string]string, error) {
paths := make(map[string]string, m.LenPaths())
Expand Down
2 changes: 1 addition & 1 deletion internal/ocfltest/seedfs.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SeedFS is based on `testing/fstest/mapfs.go` from the go standard libary,
// SeedFS is based on `testing/fstest/mapfs.go` from the go standard library,
// which is distributed with the following license:
//
//
Expand Down
2 changes: 1 addition & 1 deletion internal/pathtree/pathtree.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var (
)

// Node is the primary type for pathtree: it includes a value, Val, of generic
// type T and map of named references to direct descendats, Children. Descendant
// type T and map of named references to direct descendants, Children. Descendant
// nodes are mapped by their name, which cannot include '/'. If Children is nil,
// the node is considered a directory node. Otherwise, it is considered a file
// node.
Expand Down
2 changes: 1 addition & 1 deletion objectstate.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ func (entry *objStateDirEntry) Info() (fs.FileInfo, error) {
}, nil
}

// objStateFileInfo implementes fs.FileInfo
// objStateFileInfo implements fs.FileInfo
type objStateFileInfo struct {
name string // logical name from OpenFile/OpenDir
modtime time.Time
Expand Down
10 changes: 6 additions & 4 deletions ocflv1/codes/codes.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ package codes

// This is generated code. Do not modify. See gen folder.

import "github.com/srerickson/ocfl-go/validation"
import "github.com/srerickson/ocfl-go"
import (
"github.com/srerickson/ocfl-go"
"github.com/srerickson/ocfl-go/validation"
)

// E001: The OCFL Object Root must not contain files or directories other than those specified in the following sections.
var E001 = validation.NewCode("E001",
Expand Down Expand Up @@ -1141,11 +1143,11 @@ var E089 = validation.NewCode("E089",
},
})

// E090: Hard and soft (symbolic) links are not portable and MUST NOT be used within OCFL Storage hierachies.
// E090: Hard and soft (symbolic) links are not portable and MUST NOT be used within OCFL Storage hierarchies.
var E090 = validation.NewCode("E090",
map[ocfl.Spec]*validation.Ref{
{1, 0}: {
Description: "Hard and soft (symbolic) links are not portable and MUST NOT be used within OCFL Storage hierachies.",
Description: "Hard and soft (symbolic) links are not portable and MUST NOT be used within OCFL Storage hierarchies.",
URL: "https://ocfl.io/1.0/spec/#E090",
},
{1, 1}: {
Expand Down
2 changes: 1 addition & 1 deletion ocflv1/commit.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ func Commit(ctx context.Context, fsys ocfl.WriteFS, objPath string, objID string
// Mutate object: tranfser files from stage to object
if len(xfers) > 0 {
if err = xfer.Copy(ctx, stage.FS, fsys, xfers, ocfl.XferConcurrency(), opts.logger.WithGroup("xfer")); err != nil {
err = fmt.Errorf("transfering new object contents: %w", err)
err = fmt.Errorf("transferring new object contents: %w", err)
return &CommitError{Err: err, Dirty: true}
}
}
Expand Down
2 changes: 1 addition & 1 deletion ocflv1/commit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ func testUpdateObject(ctx context.Context, fixtureObj *ocfl.ObjectRoot, t *testi
// creates a temporary directory and copies all files in the object into the
// directory, returning the tmp directory root. The object will be located at
// obj.Path in the new tmp directory. The caller should remember to removeall
// the temp directoy.
// the temp directory.
func mkObjectTemp(obj *ocfl.ObjectRoot) (string, error) {
ctx := context.Background()
tmpdir, err := os.MkdirTemp("", "test-ocfl-object-*")
Expand Down

0 comments on commit f728e5f

Please sign in to comment.