set

package
v0.0.0-...-bc1b0c2 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package set implement

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Set

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

Set struct

func NewSet

func NewSet(opt ...interface{}) *Set

NewSet news a set

func (*Set) Add

func (s *Set) Add(e interface{}) bool

Add : add an element to Set

func (*Set) Clear

func (s *Set) Clear()

Clear : clear the set.

func (*Set) Has

func (s *Set) Has(e interface{}) bool

Has indicates whether the set has the element.

func (*Set) Len

func (s *Set) Len() int32

Len return the length of the set

func (*Set) Remove

func (s *Set) Remove(e interface{})

Remove remove an element from set.

func (*Set) Slice

func (s *Set) Slice() (list []interface{})

Slice init set from []interface.

Jump to

Keyboard shortcuts

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