Documentation ¶
Index ¶
- type Containers
- func (c *Containers) Delete(key string)
- func (c *Containers) FuzzyDelete(keyPre string)
- func (c *Containers) Get(key string) interface{}
- func (c *Containers) KeyIsExists(key string) (interface{}, bool)
- func (c *Containers) Set(key string, value interface{}) (res bool)
- func (c *Containers) Update(key string, value interface{}) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Containers ¶
type Containers struct { }
Containers 定义一个容器结构体
func CreateContainersFactory ¶
func CreateContainersFactory() *Containers
CreateContainersFactory 创建一个容器工厂
func (*Containers) FuzzyDelete ¶
func (c *Containers) FuzzyDelete(keyPre string)
FuzzyDelete 按照键的前缀模糊删除容器中注册的内容
func (*Containers) KeyIsExists ¶
func (c *Containers) KeyIsExists(key string) (interface{}, bool)
KeyIsExists 4. 判断键是否被注册
func (*Containers) Set ¶
func (c *Containers) Set(key string, value interface{}) (res bool)
Set 1.以键值对的形式将代码注册到容器
func (*Containers) Update ¶
func (c *Containers) Update(key string, value interface{}) bool
Update 更新容器中注册的内容
Click to show internal directories.
Click to hide internal directories.