Documentation ¶
Index ¶
- type StringSet
- func (set StringSet) Add(s string)
- func (set StringSet) Contains(s string) bool
- func (set1 StringSet) Difference(set2 StringSet) StringSet
- func (set1 StringSet) Equals(set2 StringSet) bool
- func (set1 StringSet) Intersection(set2 StringSet) StringSet
- func (set StringSet) IsEmpty() bool
- func (set StringSet) MarshalJSON() ([]byte, error)
- func (set StringSet) Remove(s string)
- func (set *StringSet) Scan(src interface{}) error
- func (set StringSet) Size() int
- func (set StringSet) String() string
- func (set StringSet) ToSlice() []string
- func (set1 StringSet) Union(set2 StringSet) StringSet
- func (set *StringSet) UnmarshalJSON(data []byte) error
- func (set *StringSet) Value() (driver.Value, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StringSet ¶
type StringSet map[string]struct{}
StringSet defines set that contains some string
func CopyStringSet ¶
CopyStringSet deep copy a set and return the copied one
func CreateStringSet ¶
CreateStringSet creates a stringset contains given strings
func (StringSet) Difference ¶
Difference returns the different part of 2 sets
func (StringSet) Intersection ¶
Intersection returns the intersection part of 2 sets
func (StringSet) MarshalJSON ¶
MarshalJSON convert set to json
func (StringSet) String ¶
String converts stringset to string type format like `[elem1 elem2 elem3]`
func (*StringSet) UnmarshalJSON ¶
UnmarshalJSON convert a json format bytes to stringset structure
Click to show internal directories.
Click to hide internal directories.