Skip to content

Use generics internally #533

@peterstace

Description

@peterstace

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions