E0131: A function an around decorator can't wrap
A decorator of the form func(ctx context.Context, fn func(context.Context) error, opts ...O) error, such as @orm.Transaction, runs the function's body inside it: the body becomes fn, the function's context goes in as ctx, and the declaration's decorators of type O (@orm.TxOn("crm")) are its options. The function needs a named context.Context parameter, a body, and an error result — error, (T, error) or Result[T] — and takes one such decorator.
Wrong
vuka
@orm.Transaction
func publish(slug string) {
…
}Right
vuka
@orm.Transaction
func publish(ctx context.Context, slug string) error {
…
}