Skip to content

SquareHole/genericlist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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