This commit is contained in:
Slavomir 2021-07-21 17:07:47 +02:00
parent 60a2775a45
commit 26cb759441
1 changed files with 0 additions and 43 deletions

View File

@ -126,46 +126,3 @@ func newHTTP() *http.Client {
Transport: gzhttp.Transport(tr),
}
}
// type wrapped struct {
// beforeHooks []JSONRPCClient
// cl JSONRPCClient
// afterHooks []JSONRPCClient
// }
// func (wr *wrapped) CallForInto(ctx context.Context, out interface{}, method string, params []interface{}) error {
// for _, ware := range wr.beforeHooks {
// err := ware.CallForInto(ctx, &out, method, params)
// if err != nil {
// return err
// }
// }
// err := wr.cl.CallForInto(ctx, &out, method, params)
// if err != nil {
// return err
// }
// for _, ware := range wr.afterHooks {
// err := ware.CallForInto(ctx, &out, method, params)
// if err != nil {
// return err
// }
// }
// return nil
// }
// func (cl *Client) WithBeforeHook(beforeHook JSONRPCClient) *Client {
// /* code */
// return nil
// }
// func (cl *Client) WithAfterHook(afterHook JSONRPCClient) *Client {
// /* code */
// return nil
// }
// // Expose this to make it easily expandable; or maybe don't ???
// func (cl *Client) CallForInto(ctx context.Context, out interface{}, method string, params []interface{}) error {
// return cl.rpcClient.CallForInto(ctx, &out, method, params)
// }