Skip to content

Commit 84ec968

Browse files
authored
Format README.md
1 parent 0525e2b commit 84ec968

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

dependency_injection/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ di := NewDependencyInjection()
1212
```
1313
## Adding and Removing Dependencies
1414

15-
Add:
15+
### Add:
1616

1717
```go
1818
di.Add(obj interface{})
@@ -26,7 +26,7 @@ config := NewConfig()
2626
di.Add(config)
2727
```
2828

29-
Remove:
29+
### Remove:
3030
```go
3131
di.Remove(obj interface{})
3232
```
@@ -120,7 +120,7 @@ The DI container supports various lifetimes to manage the lifecycle of dependenc
120120
Default lifetime. A single instance is shared globally.
121121

122122
### Scoped:
123-
A new instance is created for each logical "scope" (e.g., per request). Use NewScopedDependencyInjection.
123+
A new instance is created for each logical "scope" (e.g., per request). Use `NewScopedDependencyInjection`.
124124
```go
125125
func NewScopedDependencyInjection(di *DependencyInjection) *DependencyInjection
126126
```
@@ -130,7 +130,7 @@ scopedDi := NewScopedDependencyInjection(di)
130130
```
131131

132132
### Transient:
133-
A new instance is created every time the dependency is requested. Use NewTransientDependencyInjection.
133+
A new instance is created every time the dependency is requested. Use `NewTransientDependencyInjection`.
134134
```go
135135
func NewTransientDependencyInjection(di *DependencyInjection) *DependencyInjection
136136
```
@@ -140,7 +140,7 @@ transientDi := NewTransientDependencyInjection(di)
140140
```
141141

142142
### Pooled:
143-
Maintains a pool of objects that are reused and garbage-collected as needed. Use NewPooledDependencyInjection.
143+
Maintains a pool of objects that are reused and garbage-collected as needed. Use `NewPooledDependencyInjection`.
144144

145145
```go
146146
func NewPooledDependencyInjection(di *DependencyInjection) *DependencyInjection

0 commit comments

Comments
 (0)