4 ms·
This is the way that “optional” methods work in Go. For example, go decided not to rebuild the entire HTTP library to support web sockets. Instead, supported s
by inlined 7y ago
This is the way that “optional” methods work in Go. For example, go decided not to rebuild the entire HTTP library to support web sockets. Instead, supported servers will pass an http.Request that also implements http.Hijacker for letting a request stay alive after the Handler closure
- weberc2 7y agoI get it, but I disagree with subverting the type system. The type system is there to promote safety and maintainability; you shouldn't subvert it even if "you" are the std lib.