Skip to content

Commit

Permalink
fix misspelling
Browse files Browse the repository at this point in the history
  • Loading branch information
Ompluscator committed Oct 18, 2022
1 parent 7b001ce commit 9e3b971
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![Go Reference](https://pkg.go.dev/badge/github.com/Ompluscator/genjector.svg)](https://pkg.go.dev/github.com/Ompluscator/genjector)

# Package Genjector
Reflection-free Run-Time Dependency Injection framework for Go 1.18+

Expand Down
3 changes: 3 additions & 0 deletions examples/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ func TestAsProvider(t *testing.T) {
value: "value provided inside the ProviderMethod",
}, nil
}))
if err != nil {
t.Error("binding should not cause an error")
}

instance, err := genjector.NewInstance[*ProviderStruct]()
if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions injection.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ type Binding interface {
}

// BindingSource represents an interface that delivers starting Key and
// Binding instances, that later could be overriden by KeyOption or
// Binding instances, that later could be overridden by KeyOption or
// BindingOption.
type BindingSource[T any] interface {
Key() Key
Expand Down Expand Up @@ -118,7 +118,7 @@ func Bind[T any](source BindingSource[T], options ...BindingOption) error {
return nil
}

// MustBind wraps Bind method, by making sure error is not returned as an arguement.
// MustBind wraps Bind method, by making sure error is not returned as an argument.
//
// Still, in case of error, it panics.
func MustBind[T any](source BindingSource[T], options ...BindingOption) {
Expand Down Expand Up @@ -175,7 +175,7 @@ func NewInstance[T any](options ...KeyOption) (T, error) {
return result, nil
}

// MustNewInstance wraps NewInstance method, by making sure error is not returned as an arguement.
// MustNewInstance wraps NewInstance method, by making sure error is not returned as an argument.
//
// Still, in case of error, it panics.
func MustNewInstance[T any](options ...KeyOption) T {
Expand Down

0 comments on commit 9e3b971

Please sign in to comment.