What is Type Parameter in Go
tags: learning go programming
content
- Type Parameter makes function able to work with multiple types, while maintaining type safety
- Type Parameter is in square bracket, before the function’s arguments
func myFunc[T TypeConstraint](param T) (T, error) {}