Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
miladrahimi authored Apr 16, 2022
1 parent 0b14e19 commit 71ca5b8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,11 +261,14 @@ The global container is still available.

### Must Helpers

If you believe that the container shouldn't raise any error and you like panics, in this case, Must helpers are for you.
You might believe that the container shouldn't raise any error and you prefer panics.
In this case, Must helpers are for you.
Must helpers are global methods that panic instead of returning errors.

```go
c := container.New()
// Global instance:
// c := container.Global

container.MustSingleton(c, func() Shape {
return &Circle{a: 13}
Expand Down

0 comments on commit 71ca5b8

Please sign in to comment.