Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
miladrahimi committed Oct 7, 2019
1 parent 4a64d38 commit 7cc2c4a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,15 @@ container.Singleton(func(c Config) Database {

Notice: You can only resolve the dependencies in a binding resolver function that has already bound.

### Usage Tips

#### Performance
The package Container inevitably uses reflection in binding and resolving processes.
If performance is a concern, you should use this package more carefully.
Try to bind and resolve the dependencies out of the processes that are going to run many times
(for example, on each request), put it where that run only once when you run your applications
like main and init functions.

## Contributors

* [@miladrahimi](https://github.com/miladrahimi)
Expand Down

0 comments on commit 7cc2c4a

Please sign in to comment.