[go-nuts] Help with Go channels and select talk

2019-12-09 Thread luka . venac
You can do it without a goroutine as long as the channel has at least one buffer slot so execution passes to the select and uses the data. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails f

Re: [go-nuts] What is the fundamental unit of linking in Go?

2019-06-29 Thread luka . venac
Yes, I thought about it and I am quite sure that it would be very complex code detecting referenced but unused code. I am just starting with learning how to break things apart properly. Go makes it easy to modularise but old bad habits to make monolithic stuff don't dissolve overnight, and in m

Re: [go-nuts] What is the fundamental unit of linking in Go?

2019-06-28 Thread luka . venac
I am pretty sure that every folder in a Go code repository creates one binary object, maybe two with a test package alongside it. It just didn't occur to me that it would not trace the execution path of the main, and where each of the closures/function references in this case are stored in a ma

[go-nuts] What is the fundamental unit of linking in Go?

2019-06-28 Thread luka . venac
I have come up against something a bit strange and interesting that I didn't really expect from the Go compiler. I have a main which uses a structure created in a package, which contains a whole load of references to other packages. What I discovered is that even though only one of these includ