mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-02 23:16:51 +00:00
cmd/wrapper_coverage: prevent non-needed REST requests via context timeout (#1154)
* wrapper_coverage/exchanges: cancel context to not send rest requests/ populate context through functions that do rest requests * linter: fix * exchange_template: fix test --------- Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"log"
|
||||
"sync"
|
||||
@@ -34,7 +35,7 @@ func main() {
|
||||
cfgs := make([]config.Exchange, 0, len(exchanges))
|
||||
for x := range exchanges {
|
||||
var cfg *config.Exchange
|
||||
cfg, err = exchanges[x].GetDefaultConfig()
|
||||
cfg, err = exchanges[x].GetDefaultConfig(context.Background())
|
||||
if err != nil {
|
||||
log.Printf("Failed to get exchanges default config. Err: %s", err)
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user