Re: [go-nuts] cannot take the address of method()

2018-09-24 Thread Ian Lance Taylor
On Sun, Sep 23, 2018 at 8:24 PM, Jesse McNelis wrote: > On Mon, Sep 24, 2018 at 5:33 AM, Tamás Király wrote: >> Hi, >> >> can anyone explain why the following does not work? >> i want to have the return value's address not the method itself. >> >> package main >> >> func main() { >> //first >> ad

Re: [go-nuts] cannot take the address of method()

2018-09-23 Thread Jesse McNelis
On Mon, Sep 24, 2018 at 5:33 AM, Tamás Király wrote: > Hi, > > can anyone explain why the following does not work? > i want to have the return value's address not the method itself. > > package main > > func main() { > //first > addressofstring := &method() > } > > func method() string { > return