datax

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Encode

func Encode(path string, tar interface{}) error

gob编码

func Test

func Test()

Types

type Person

type Person struct {
	Name string
}

func Decode

func Decode(path string) (tar *Person, err error)

gob解码:Decode参数须是具体类型,不能是interface,无法封装

type Set

type Set struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func New

func New(items ...int) *Set

新建集合对象

func (*Set) Add

func (s *Set) Add(items ...int)

添加元素

func (*Set) Clear

func (s *Set) Clear()

清空集合

func (*Set) Complement

func (s *Set) Complement(full *Set) *Set

补集

func (*Set) Count

func (s *Set) Count() int

元素个数

func (*Set) Empty

func (s *Set) Empty() bool

空集合判断

func (*Set) Has

func (s *Set) Has(items ...int) bool

判断元素是否存在

func (*Set) Intersect

func (s *Set) Intersect(sets ...*Set) *Set

交集

func (*Set) List

func (s *Set) List() []int

无序列表

func (*Set) Minus

func (s *Set) Minus(sets ...*Set) *Set

差集

func (*Set) Remove

func (s *Set) Remove(items ...int)

删除元素

func (*Set) SortList

func (s *Set) SortList() []int

排序列表

func (*Set) Union

func (s *Set) Union(sets ...*Set) *Set

并集

Jump to

Keyboard shortcuts

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