|
|
|
|
|
by mseepgood
998 days ago
|
|
There are no differences. You can always substitute one for the other without change in behaviour. These two are interchangeable: func f[T any]() {}
func f[T interface{}]() {}
and these two are interchangeable: func f(x any) {}
func f(x interface{}) {}
Maybe OP means the difference between using an interface as type parameter constraint and using an interface as a function parameter / variable type. |
|