peterstace / simplefeatures

Simple Features is a pure Go Implementation of the OpenGIS Simple Feature Access Specification
MIT License
127 stars 19 forks source link

Use generics internally #533

Open peterstace opened 11 months ago

peterstace commented 11 months ago

I've purposefully not used generics for a long time internally because I didn't want to bump the required go version to 1.18 (it's currently go 1.17).

That's quite a few versions ago now, so it should be fine to bump this to go 1.18 and start using generics internally.

In particular, having a mapSlice[T, U any](s []T, func(T) U) []U helper would clean up a lot of repeated boilerplate.