container

package
v1.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

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) Delete

func (c *Containers) Delete(key string)

Delete 2.删除

func (*Containers) FuzzyDelete

func (c *Containers) FuzzyDelete(keyPre string)

FuzzyDelete 按照键的前缀模糊删除容器中注册的内容

func (*Containers) Get

func (c *Containers) Get(key string) interface{}

Get 3.传递键,从容器获取值

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 更新容器中注册的内容

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL