Skip to content
/ set Public

This is a Set based on Generic and Map implementations.

License

Notifications You must be signed in to change notification settings

min0625/set

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Set

Go Reference

This is a Set based on Generic and Map implementations.

Installation

go get github.com/min0625/set

Quick start

package main

import (
	"fmt"

	"github.com/min0625/set"
)

func main() {
	s := make(set.Set[int])

	s.Store(1, 2, 3)
	fmt.Println(s.Has(1))

	s.Delete(1)
	fmt.Println(s.Has(1))

	// Output:
	// true
	// false
}

Example

See: ./set_example_test.go