Re: [go-nuts] Re: Is there a way to create a global variable inside go routine stack? so that i can access any time, without passing around between methods/functions. Crazy thought !!!..

2020-05-29 Thread adithyasashasai
Yeah same problem. On Wednesday, May 27, 2020 at 8:03:35 AM UTC+5:30, Robert Engels wrote: > > You want the gls package referenced earlier. > > Go doesn’t have it built in because the designers don’t like it or feel it > is necessary. You can find and read the GitHub issue that covers

Re: [go-nuts] Re: Is there a way to create a global variable inside go routine stack? so that i can access any time, without passing around between methods/functions. Crazy thought !!!..

2020-05-29 Thread adithyasashasai
Thanx. This i thought but i want context as "Global" struct, which i cant do. Anyhow please refer https://github.com/golang/go/issues/21355 On Wednesday, May 27, 2020 at 6:34:24 AM UTC+5:30, Jon Perryman wrote: > > > On Sun, May 24, 2020 at 11:05 PM > > wrote: > > Yeah this works, but you can

Re: [go-nuts] Re: Is there a way to create a global variable inside go routine stack? so that i can access any time, without passing around between methods/functions. Crazy thought !!!..

2020-05-29 Thread adithyasashasai
This is issue i am referring to https://github.com/golang/go/issues/21355. On Monday, May 25, 2020 at 10:21:19 PM UTC+5:30, Michael Jones wrote: > > Variables are names associated with values, values that can *vary*, that > is, can be changed. (Unlike constants, which are *constant* values.) > >

[go-nuts] Re: Is there a way to create a global variable inside go routine stack? so that i can access any time, without passing around between methods/functions. Crazy thought !!!..

2020-05-29 Thread adithyasashasai
https://github.com/golang/go/issues/21355, this is the issue i am reffering to. On Monday, May 25, 2020 at 10:38:31 PM UTC+5:30, Jake Montgomery wrote: > > On Sunday, May 24, 2020 at 3:46:54 PM UTC-4, adithya...@gmail.com wrote: >> >> if i am not wrong, Even the main itself is a go routine,

Re: [go-nuts] Re: Is there a way to create a global variable inside go routine stack? so that i can access any time, without passing around between methods/functions. Crazy thought !!!..

2020-05-26 Thread Robert Engels
You want the gls package referenced earlier. Go doesn’t have it built in because the designers don’t like it or feel it is necessary. You can find and read the GitHub issue that covers thread/go local storage. > On May 26, 2020, at 8:04 PM, Jon Perryman wrote: > >  > > On Sun, May 24,

Re: [go-nuts] Re: Is there a way to create a global variable inside go routine stack? so that i can access any time, without passing around between methods/functions. Crazy thought !!!..

2020-05-26 Thread Jon Perryman
On Sun, May 24, 2020 at 11:05 PM wrote: > Yeah this works, but you can say this as workaround, what i really want is, does native go support? if not why? >> On Monday, May 25, 2020 at 7:57:17 AM UTC+5:30, tokers wrote: >> You may try to inspect this go package: https://github.com/jtolio/gls Each

[go-nuts] Re: Is there a way to create a global variable inside go routine stack? so that i can access any time, without passing around between methods/functions. Crazy thought !!!..

2020-05-25 Thread Jake Montgomery
On Sunday, May 24, 2020 at 3:46:54 PM UTC-4, adithya...@gmail.com wrote: > > if i am not wrong, Even the main itself is a go routine, which have global > variables? > Perhaps you should describe a bit more what you mean? People seem to be making assumptions that you meant something different

Re: [go-nuts] Re: Is there a way to create a global variable inside go routine stack? so that i can access any time, without passing around between methods/functions. Crazy thought !!!..

2020-05-25 Thread Michael Jones
Variables are names associated with values, values that can *vary*, that is, can be changed. (Unlike constants, which are *constant* values.) In the beginning, all variables were global, and this was not good. Then came local variables, ones *local* to a function, which came and went as

[go-nuts] Re: Is there a way to create a global variable inside go routine stack? so that i can access any time, without passing around between methods/functions. Crazy thought !!!..

2020-05-25 Thread adithyasashasai
Yeah this works, but you can say this as workaround, what i really want is, does native go support? if not why? On Monday, May 25, 2020 at 7:57:17 AM UTC+5:30, tokers wrote: > > You may try to inspect this go package: https://github.com/jtolio/gls > -- You received this message because you are

[go-nuts] Re: Is there a way to create a global variable inside go routine stack? so that i can access any time, without passing around between methods/functions. Crazy thought !!!..

2020-05-24 Thread tokers
You may try to inspect this go package: https://github.com/jtolio/gls -- 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.

[go-nuts] Re: Is there a way to create a global variable inside go routine stack? so that i can access any time, without passing around between methods/functions. Crazy thought !!!..

2020-05-24 Thread adithyasashasai
if i am not wrong, Even the main itself is a go routine, which have global variables? On Monday, May 25, 2020 at 12:23:49 AM UTC+5:30, Saied Seghatoleslami wrote: > > Variable scope is a textual (special if you like) concept. Go routines > are a temporal concept. Does it make sense to