Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/internal/builder/builder_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func (b *Builder) IsError(expected error) *predicate.Predicate {
// ---------------------------------------------------------------------------
// From pkg/internal/predicate/impl/ext.go

// Is is an extention point allowing for the definition of a custom
// Is is an extension point allowing for the definition of a custom
// predicate function to evaluate a predicate chain
func (b *Builder) Is(desc string, f predicate.PredicateFunc) *predicate.Predicate {
b.p.RegisterPredicate(impl.Is(desc, f))
Expand All @@ -153,7 +153,7 @@ func (b *Builder) Is(desc string, f predicate.PredicateFunc) *predicate.Predicat
return &b.p
}

// Eval is an extention point allowing for the definition of custom
// Eval is an extension point allowing for the definition of custom
// transformation functions in a predicate chain
func (b *Builder) Eval(desc string, f predicate.TransformFunc) *Builder {
b.p.RegisterTransformation(impl.Eval(desc, f))
Expand Down
4 changes: 2 additions & 2 deletions pkg/internal/predicate/impl/ext.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import (
"github.com/maargenton/go-testpredicate/pkg/internal/predicate"
)

// Is is an extention point allowing for the definition of a custom
// Is is an extension point allowing for the definition of a custom
// predicate function to evaluate a predicate chain
func Is(desc string, f predicate.PredicateFunc) (string, predicate.PredicateFunc) {
return desc, f
}

// Eval is an extention point allowing for the definition of custom
// Eval is an extension point allowing for the definition of custom
// transformation functions in a predicate chain
func Eval(desc string, f predicate.TransformFunc) (string, predicate.TransformFunc) {
return desc, f
Expand Down
3 changes: 1 addition & 2 deletions pkg/prettyprint/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,8 @@ func nextToken(is string) (t token, os string) {
if empty {
t = next
return
} else {
ts += "...} " + next.str
}
ts += "...} " + next.str
}
t = makeToken(ts)
return
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions pkg/require/require.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"github.com/maargenton/go-testpredicate/pkg/internal/predicate"
)

// Context captures an additional context value to be displayed upon failure.
type Context = predicate.ContextValue

// That captrues the test context and a value for the purpose of building and
Expand Down
4 changes: 2 additions & 2 deletions pkg/value/field.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
)

// Field takes a root value or an array of root values, navigates through the
// data tree according to a keypath, and returns the targetted values. `keypath`
// data tree according to a keypath, and returns the targeted values. `keypath`
// is a dot-separated list of keys, each used as either field name in a struct,
// a key in a map, or a niladic method name. Any error during key evalation
// results in a nil value. If a method invocation yields multiple return values,
Expand All @@ -21,7 +21,7 @@ import (
//
// Because the implementation is using the reflect package and is mostly type
// agnostic, the resulting arrays are always of type []interface{}, even if the
// field types are consistent accross values.
// field types are consistent across values.
func Field(value interface{}, keypath string) interface{} {
var keys = strings.Split(keypath, ".")
return field(value, keys)
Expand Down
1 change: 1 addition & 0 deletions pkg/verify/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"github.com/maargenton/go-testpredicate/pkg/internal/predicate"
)

// Context captures an additional context value to be displayed upon failure.
type Context = predicate.ContextValue

// That captrues the test context and a value for the purpose of building and
Expand Down