Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Group ¶
Group 懒加载容器
type LazyLoadGroup ¶
type LazyLoadGroup interface { Get(key string) interface{} ReSet(nf func() interface{}) Clear() }
LazyLoadGroup 懒加载结构化
func NewGroup ¶
func NewGroup(f func() interface{}) LazyLoadGroup
NewGroup Group 实例化方法
Example ¶
// 类似 sync.Pool 一样 // 初始化一个group group = NewGroup(createResources)
Output:
Click to show internal directories.
Click to hide internal directories.