Haha, thanks. I didn't feel get pushed. :)
2021년 1월 10일 일요일 오후 9시 36분 39초 UTC+9에 axel.wa...@googlemail.com님이 작성:
> On Sun, Jan 10, 2021 at 12:57 PM 김용빈 wrote:
>
>> Thank you Wagner, as always!
>>
>> Yes, I asked because it is a field of a struct. With your answer, n
> fields that may be addressed individually. Each such element acts like a
>> variable.
>
>
> Okay, so every field can be treated as its own variable. Thus, applying
> the rules of the memory model to individual fields is correct.
>
> On Sun, Jan 10, 2021 at 10:30 AM 김용
I have a struct that will be used concurrently.
type A struct {
sync.Mutex
id string
// other members
...
}
The other members of A will be concurrently read or written. So I think I
have to hold lock of A for those.
But A.id will be written once at creation time of A (when it
an `RWMutex`, all
>> things being equal.
>>
>> So I tend to handle it the exact opposite of what you suggest - unless I
>> have a specific reason to use `RWMutex`, I default to `Mutex`.
>>
>> On Sun, Dec 20, 2020 at 9:44 AM 김용빈 wrote:
>>
>>> we usually
we usually both read and write for a value. not only read, nor write.
with that, I feel RWMutex is always right choice.
when should I use Mutex instead of RWMutex?
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group
cated and doesn't have to touch the
> template. Something like this:
>
> var MapStringInterface map[string]interface{}
> for i,x := range MapStringMapStringThing {
> MapStringInterface[i]=x
> }
>
> On Saturday, 2 March 2019 11:01:10 UTC+1, 김용빈 wrote:
>>
>> Thank you
I wanted sorted key of a map, of course I can do this.
// myMap => map[string]map[string]Something
keys := make([]string, 0)
for k := range myMap {
keys = append(keys, k)
}
but what I want is make this a function.
func sortedKeys(m map[string]interface{}) {
keys := make([]string, 0)
Hmm.. I tested it again and it works today. I think it was just my problem.
Sorry for the confusion and thank you!
2019년 1월 10일 목요일 오후 5시 25분 12초 UTC+9, Justin Israel 님의 말:
>
>
>
> On Thu, Jan 10, 2019, 9:14 PM 김용빈 > wrote:
>
>> Hi, Justin. Thank you for the response.
Yes, I am using TestMain. But signal.Notify is not helping me.
2019년 1월 10일 목요일 오후 2시 28분 10초 UTC+9, Justin Israel 님의 말:
>
>
>
> On Thu, Jan 10, 2019 at 6:24 PM 김용빈 >
> wrote:
>
>> I tried signal.Notify but it seems it doesn't work.
>>
>> Then I find this:
andler for SIGINT/SIGTERM also works
> for me:
> https://play.golang.org/p/93VmTTgE4YB
>
> Justin
>
>
> On Thu, Jan 10, 2019 at 6:29 PM 김용빈 >
> wrote:
>
>> Sorry I didn't clarify but I mean when it is killed/terminated.
>>
>> 2019년 1월 10일 목요일 오후 2시
Sorry I didn't clarify but I mean when it is killed/terminated.
2019년 1월 10일 목요일 오후 2시 24분 35초 UTC+9, 김용빈 님의 말:
>
> I tried signal.Notify but it seems it doesn't work.
>
> Then I find this:
> https://github.com/golang/go/issues/15553#issuecomment-217162874
>
> So what s
I tried signal.Notify but it seems it doesn't work.
Then I find this:
https://github.com/golang/go/issues/15553#issuecomment-217162874
So what should I do to make my function always run at exit in test?
--
You received this message because you are subscribed to the Google Groups
package main
func unused(x interface{}) {}
func main() {
a := 1
unused(a)
}
2012년 3월 7일 수요일 오후 8시 32분 19초 UTC+9, Elazar Leibovich 님의 말:
>
> I sometimes have a very strange error, which I can't understand its source.
>
> One of my techniques for finding it, is isolate the problem to a
Tank you Sander.
I successfully installed and it works well.
Still I want to know simple way though.
If anyone knows about it, please let me know. :)
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop
Hello,
How could I achieve auto go fmt on save in vim? (with 2~3 lines of code)
I don't want install entire plug-in like vim-go. Or is it better to do?
Thank you.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this
15 matches
Mail list logo