Hacker News new | ask | show | jobs
by fleitz 4542 days ago
Go pretty much only has extension methods.
1 comments

In .NET, extension methods are functions defined on the classes you don't own, like string or System.Net.WebRequest. In Go, you cannot define functions on builtin types and exported types from packages other than your own package. So Go way of defining functions on types is not exactly extension methods.