Skip to content

magejiCoder/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
 }

About

The Go generics hashset .

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages