6 ms·
e.g. var typeA Interface = (*TypeA)(nil) println(typeA == nil) // false println(typeA == (*TypeA)(nil)) // true Yes really https://go.dev/play
by Spiwux 3y ago
e.g.
var typeA Interface = (*TypeA)(nil)
println(typeA == nil) // false
println(typeA == (*TypeA)(nil)) // true
Yes really
https://go.dev/play/p/sz44kJW8OuT https://go.dev/play/p/sz44kJW8OuT