Quiz: Transactional Messaging
Test yourself on what you have learned so far.
We'll cover the following...
We'll cover the following...
Technical Quiz
1.
What does the Scoped()
method return in the provided code snippet?
container := di.New()
container.AddSingleton("db", dbFn)
container.AddScoped("tx", txFn)
db1 := container.Get("db")
tx1 := container.Get("tx")
ctx := container.Scoped(context.Background())
A.
A container instance
B.
A context with the container value
C.
A new instance of the dependency
D.
A child container
1 / 5
...