Skip to content

Latest commit

 

History

History
76 lines (49 loc) · 2.2 KB

readme.md

File metadata and controls

76 lines (49 loc) · 2.2 KB

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.