Skip to content
/ set Public
forked from magejiCoder/set

The Go generics hashset .

Notifications You must be signed in to change notification settings

ezbuy/set

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Generic Set

UnitTest codecov CodeQL

Port scylladb/go-set to Go Generics.

Usage

The usage is almost identical to the original set package.

But for customized type , the original set package needs to generate new type package via gen_set.sh; For generics set package , just uses it as the builtin type:

type CustomizedType struct {
	f string
}

 s:= New[CustomizedType]()
 s.Add(CustomizedType{"a"})
 if s.Has(CustomizedType{"a"}) {
	// do something
 }

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%