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 >>

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 := () > } > > func method() string { > return

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

2018-09-23 Thread Tamás Király
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 := () } func method() string { return "value" } https://play.golang.org/p/UbJ7SK0m9w6 regards Tamás Király -- You