Very subtle fix:
https://play.golang.org/p/xTEGpgIyP6
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to golang-nuts+unsubscr...@googlegroups.com.
For more options,
Very subtle fix:
https://play.golang.org/p/xTEGpgIyP6
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to golang-nuts+unsubscr...@googlegroups.com.
For more options,
https://golang.org/doc/faq#nil_error
On Thu, Feb 16, 2017 at 12:38 AM, dreyk wrote:
> What do you expect as output of following code?
>
> package main
>
> import "fmt"
>
> type MyInterface interface {
>GetName() string
> }
> type MyInterfaceImpl struct {
>Name string
> }
> func (
What do you expect as output of following code?
package main
import "fmt"
type MyInterface interface {
GetName() string
}
type MyInterfaceImpl struct {
Name string
}
func (i *MyInterfaceImpl) GetName() string {
return i.Name
}
func getNilMyInterface() MyInterface {
re