set

package module
v0.0.0-...-6b5eba6 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: MIT Imports: 1 Imported by: 3

README

Go Set

A wrapper around map which offers functions that do not require a value to be provided.

Getting Started

Installing
go get github.com/kagadar/go-set
Usage
import "github.com/kagadar/go-set"

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Empty

type Empty struct{}

type Set

type Set[K comparable] map[K]Empty

func New

func New[K comparable](k ...K) Set[K]

func (Set[K]) Elements

func (s Set[K]) Elements() []K

func (Set[K]) Has

func (s Set[K]) Has(k K) bool

func (Set[K]) Put

func (s Set[K]) Put(k ...K)

Jump to

Keyboard shortcuts

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