File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 1
1
# nject - dependency injection
2
2
3
+ [ ![ Stability: Active] ( https://masterminds.github.io/stability/active.svg )] ( https://masterminds.github.io/stability/active.html )
3
4
[ ![ GoDoc] ( https://godoc.org/github.com/muir/nject?status.png )] ( https://pkg.go.dev/github.com/muir/nject )
4
5
![ unit tests] ( https://github.com/muir/nject/actions/workflows/go.yml/badge.svg )
5
6
[ ![ report card] ( https://goreportcard.com/badge/github.com/muir/nject )] ( https://goreportcard.com/report/github.com/muir/nject )
@@ -17,9 +18,11 @@ users to do type assertions.
17
18
Dependencies are injected via a call chain: list functions to be called
18
19
that take and return various parameters. The functions will be called
19
20
in order using the return values from earlier functions as parameters
20
- for later functions.
21
+ for later functions. Only the functions that are needed to be called in
22
+ order to be able to call the last function in the chain are invoked. Then
23
+ the last function in the chain is called.
21
24
22
- Parameters are identified by their types. To have two different int
25
+ Parameters are identified by their types. To have two different ` int `
23
26
parameters, define custom types.
24
27
25
28
Type safety is checked before any functions are called.
@@ -66,7 +69,7 @@ is called. Bind() does not run the chain.
66
69
67
70
Run() is used when ad-hoc injection is desired and performance is not
68
71
critical. Run is appropriate when starting servers and running tests.
69
- It is not recommended for http endpoint handlers. Run exectes the
72
+ It is not recommended for HTTP endpoint handlers. Run exectes the
70
73
chain immediately.
71
74
72
75
### Identified by type
You can’t perform that action at this time.
0 commit comments