On Wed, Sep 12, 2018 at 2:10 PM robert engels <reng...@ix.netcom.com> wrote:

> I think it would be problematic, as the callee signature is limited -
> func() error - and with lack of method overloading you will need a lot of
> WithXXXX methods…
>

apart from the non-Go idiomatic names for the enter/exit interface method
set, I'd say it's fine.
(well, Context is now kind of "reserved" to the context.Context interface,
but ok.)

it's also relatively easy to adapt to other functions that do not return an
error (as you show in your example.)
that's what golang.org/x/sync/errgroup does:
- https://godoc.org/golang.org/x/sync/errgroup#Group.Go

> and with lack of method overloading you will need a lot of WithXXXX
methods…
no need for that: it's an interface.

-s

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to