File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ di := NewDependencyInjection()
1212```
1313## Adding and Removing Dependencies
1414
15- Add:
15+ ### Add:
1616
1717```go
1818di.Add(obj interface{})
@@ -26,7 +26,7 @@ config := NewConfig()
2626di.Add (config)
2727```
2828
29- Remove:
29+ ### Remove:
3030``` go
3131di.Remove (obj interface {})
3232```
@@ -120,7 +120,7 @@ The DI container supports various lifetimes to manage the lifecycle of dependenc
120120Default 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
125125func 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
135135func 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
146146func NewPooledDependencyInjection(di *DependencyInjection) *DependencyInjection
You can’t perform that action at this time.
0 commit comments