good morning!!!!

Skip to content
Snippets Groups Projects
helper.go 211 B
Newer Older
a's avatar
a committed
package jrpc

a's avatar
a committed
import "context"

func Do[T any](ctx context.Context, c Conn, method string, args any) (T, error) {
a's avatar
a committed
	var t T
a's avatar
a committed
	err := c.Do(ctx, t, method, args)
a's avatar
a committed
	if err != nil {
		return t, err
	}
	return t, nil
}