3 ms·
You can think of interface{} like Object in Java. Interfaces in go are simply saying "this thing satifies these properties". interface{} is an interface that a
by strbean 5y ago
You can think of interface{} like Object in Java.
Interfaces in go are simply saying "this thing satifies these properties". interface{} is an interface that anything can satisfy.
- nixpulvis 5y agoI will continue to think of interface{} as Any in Rust.
- ibraheemdev 5y ago`interface{}` used as a type is almost exactly `Box<dyn Any>`.