container
函数名 | 函数描述/介绍 |
---|---|
container.NewLinkedList | New returns an initialized list. |
container.NewSet | NewSet creates a new set |
container.NewUnsafeSet | NewUnsafeSet creates a new set that is not thread-safe |
#
函数定义#
NewLinkedList#
详细描述New returns an initialized list.
#
定义NewLinkedList() *List
#
返回值返回值(顺序) | 返回值类型 | 返回值解释 |
---|---|---|
r1 | *List |
#
NewSet#
详细描述NewSet creates a new set
Example:
s = container.NewSet("1", "2")
#
定义NewSet(vals ...any) (s *Set)
#
参数参数名 | 参数类型 | 参数解释 |
---|---|---|
vals | ...any |
#
返回值返回值(顺序) | 返回值类型 | 返回值解释 |
---|---|---|
s | *Set |
#
NewUnsafeSet#
详细描述NewUnsafeSet creates a new set that is not thread-safe
Example:
s = container.NewUnsafeSet("1", "2")
#
定义NewUnsafeSet(vals ...any) (s *Set)
#
参数参数名 | 参数类型 | 参数解释 |
---|---|---|
vals | ...any |
#
返回值返回值(顺序) | 返回值类型 | 返回值解释 |
---|---|---|
s | *Set |