Let's say I'm writing some library for internal usage in my project, what's
the idiomatic way to design visibility of struct members?
- Option 1. export structs and members as much as possible. Only hide
ones that need to be protected, e.g. by a lock
- Option 2. hide as much as possible
pect to get from using them?
>
> On Sun, Mar 11, 2018 at 1:03 AM Jay Guo wrote:
>
>> Bump.. any thoughts? Thanks!
>>
>> - J
>>
>>
>> On Thursday, March 8, 2018 at 2:03:37 PM UTC+8, Jay Guo wrote:
>>>
>>> Golang gurus,
>>>
>&g
Bump.. any thoughts? Thanks!
- J
On Thursday, March 8, 2018 at 2:03:37 PM UTC+8, Jay Guo wrote:
>
> Golang gurus,
>
> I'm currently trying to modularize my project with the help of Golang
> plugin, and I come across this dependency vendoring dilemma.
>
> Let'
Golang gurus,
I'm currently trying to modularize my project with the help of Golang
plugin, and I come across this dependency vendoring dilemma.
Let's say we have a project layout:
- Two different projects in separate repo: `Host` and `Guest`
- `Host` depends on package `pkgA`
- `Guest
Yep. Thanks!
cheers,
- J
On Tue, Oct 10, 2017 at 11:01 PM, Ian Lance Taylor wrote:
> On Tue, Oct 10, 2017 at 7:56 AM, Jay Guo wrote:
> >
> > In my use case, both cases you presented are valid and I don't really
> need
> > to disambiguate them. So I guess cal
ue, Oct 10, 2017 at 9:42 PM, Ian Lance Taylor wrote:
> On Tue, Oct 10, 2017 at 5:34 AM, Jay Guo wrote:
> >
> > It is suggested in https://golang.org/pkg/sync/#WaitGroup that:
> >
> > // Note that calls with a positive delta that occur when the counter is
> zero
> >
Hi,
It is suggested in https://golang.org/pkg/sync/#WaitGroup that:
// Note that calls with a positive delta that occur when the counter is zero
// must happen before a Wait.
I wonder what's the reason in terms of `sync` implementation.
Essentially I'm trying to implement following logic:
for