Skip to content

SquareHole/genericlist

Repository files navigation

GenericList

tag Go Version GoDoc Build Status Go report Coverage Contributors License

πŸš€ Install

go get github.com/squarehole/genericlist

Compatibility: go >= 1.21

πŸ’‘ Usage

Description

a versatile and type-safe generic list for any type that implements the 'comparable' contract, which allows for comparisons using

func CreateList() {
    list := &GenericList[int]{}
    list.New()
    list.Add(1)
    list.Add(2)
	list.Add(3)
	
	// Increment the value of every item in the list with 1
    list.ForEach(func(i *int) { *i++ })
}

🀝 Contributing

Don't hesitate ;)

# Install some dev dependencies
make tools

# Run tests
make test
# or
make watch-test

πŸ‘€ Contributors

Contributors

πŸ’« Show your support

Give a ⭐️ if this project helped you!

GitHub Sponsors

πŸ“ License

Copyright Β© 2023 Johan van Rhyn.

This project is MIT licensed.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published