// This is a function, you can use type parameters here:
func Foo[T any](g T) { ... }
type bar struct {}
// This is a method, you can't use type parameters here:
func (b bar) Foo[T any](g T) { ... }
In the second case, "Foo" is a method which has a "bar" instance as a receiver.I've edited my original post to make it a bit clearer.