bmatsuo/lmdb-go

lmdbsync: Env should be an argument of HandleTxnErr

bmatsuo opened this issue · 0 comments

The docs for golang.org/x/net/context recommend that Context not be used to pass arguments to between functions. The Env is truly and argument for the functions. It is not always used. But it is common enough when you want to use a handler that it deserves inclusion in the arg list.

So the Handler interface should look as follows:

type Handler interface {
    HandleTxnErr(ctx context.Context, env *Env, err error) (context.Context, error)
}