scalalang2 / golang-fifo

Modern efficient cache design with simple FIFO queue only in Golang
MIT License
134 stars 5 forks source link

fix: be stricter when initializing #35

Closed costela closed 1 month ago

costela commented 1 month ago

A size < 0 is not valid and causes runtime panics when setting items. Panicking earlier with a clearer message avoids more subtle erroneous usage.

scalalang2 commented 1 month ago

@costela Thank you for your contribution : ) It's always welcome 👍