NewUsagePool returns a new usage pool that is ready to use.
()
| 62 | |
| 63 | // NewUsagePool returns a new usage pool that is ready to use. |
| 64 | func NewUsagePool() *UsagePool { |
| 65 | return &UsagePool{ |
| 66 | pool: make(map[any]*usagePoolVal), |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | // LoadOrNew loads the value associated with key from the pool if it |
| 71 | // already exists. If the key doesn't exist, it will call construct |
no outgoing calls
no test coverage detected