MCPcopy Create free account
hub / github.com/golobby/container / TestSingleton

Function TestSingleton

global_test.go:10–17  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

8)
9
10func TestSingleton(t *testing.T) {
11 container.Reset()
12
13 err := container.Singleton(func() Shape {
14 return &Circle{a: 13}
15 })
16 assert.NoError(t, err)
17}
18
19func TestSingletonLazy(t *testing.T) {
20 container.Reset()

Callers

nothing calls this directly

Calls 2

ResetMethod · 0.80
SingletonMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…