Go Generics and Constraints
Go generics use type parameters with constraints to write reusable algorithms while retaining compile-time type checking. Constraints describe the operations or underlying types that a type argument must support.
Type parameters and interfaces that constrain generic Go code.