setutil

package
v0.0.0-...-9c21ab8 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Int32Set

type Int32Set struct {
	// contains filtered or unexported fields
}

如果需要通用泛型,可以使用github.com/deckarep/golang-set这个包 非goroutine安全

func NewInt32Set

func NewInt32Set(items ...int32) *Int32Set

func (*Int32Set) Add

func (d *Int32Set) Add(items ...int32) *Int32Set

func (*Int32Set) Contains

func (d *Int32Set) Contains(items ...int32) bool

func (*Int32Set) Difference

func (d *Int32Set) Difference(other *Int32Set) *Int32Set

差集

func (*Int32Set) Intersect

func (d *Int32Set) Intersect(other *Int32Set) *Int32Set

交集

func (*Int32Set) Remove

func (d *Int32Set) Remove(items ...int32) *Int32Set

func (*Int32Set) Scan

func (d *Int32Set) Scan(src interface{}) error

func (*Int32Set) Size

func (d *Int32Set) Size() int

func (*Int32Set) ToArray

func (d *Int32Set) ToArray() []int32

func (*Int32Set) Union

func (d *Int32Set) Union(other *Int32Set) *Int32Set

并集

func (Int32Set) Value

func (d Int32Set) Value() (driver.Value, error)

自定义序列化

type Int64Set

type Int64Set struct {
	// contains filtered or unexported fields
}

func NewInt64Set

func NewInt64Set(items ...int64) *Int64Set

func (*Int64Set) Add

func (d *Int64Set) Add(items ...int64) *Int64Set

func (*Int64Set) Contains

func (d *Int64Set) Contains(items ...int64) bool

func (*Int64Set) Difference

func (d *Int64Set) Difference(other *Int64Set) *Int64Set

差集

func (*Int64Set) Intersect

func (d *Int64Set) Intersect(other *Int64Set) *Int64Set

交集

func (*Int64Set) Remove

func (d *Int64Set) Remove(items ...int64) *Int64Set

func (*Int64Set) Scan

func (d *Int64Set) Scan(src interface{}) error

func (*Int64Set) Size

func (d *Int64Set) Size() int

func (*Int64Set) ToArray

func (d *Int64Set) ToArray() []int64

func (*Int64Set) Union

func (d *Int64Set) Union(other *Int64Set) *Int64Set

并集

func (Int64Set) Value

func (d Int64Set) Value() (driver.Value, error)

自定义序列化

type StringSet

type StringSet struct {
	// contains filtered or unexported fields
}

func NewStringSet

func NewStringSet(items ...string) *StringSet

func (*StringSet) Add

func (d *StringSet) Add(items ...string) *StringSet

func (*StringSet) Contains

func (d *StringSet) Contains(items ...string) bool

func (*StringSet) Difference

func (d *StringSet) Difference(other *StringSet) *StringSet

差集

func (*StringSet) Intersect

func (d *StringSet) Intersect(other *StringSet) *StringSet

交集

func (*StringSet) Remove

func (d *StringSet) Remove(items ...string) *StringSet

func (*StringSet) Scan

func (d *StringSet) Scan(src interface{}) error

func (*StringSet) Size

func (d *StringSet) Size() int

func (*StringSet) ToArray

func (d *StringSet) ToArray() []string

func (*StringSet) Union

func (d *StringSet) Union(other *StringSet) *StringSet

并集

func (StringSet) Value

func (d StringSet) Value() (driver.Value, error)

自定义序列化

Jump to

Keyboard shortcuts

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