A Go function can be declared as follows:
func FunctionName(arg1 Type, arg2 Type, ...) {}
With Go generics, type parameters can now be applied to function declaration. Type parameters needs to be encapsulated in the square brackets [...]
and before the function parameters.
func FunctionName[T1 TypeConstraint, T2 TypeContraint, ...](arg1 T, arg2 T,...) {}
With go 1.19, types can now be declared with type parameters.
type StructName[T TypeConstraint, ...] struct {
attribute1 T
}