diff --git a/pkg/cwhub/dataset.go b/pkg/cwhub/dataset.go index ec582592c..686463ccc 100644 --- a/pkg/cwhub/dataset.go +++ b/pkg/cwhub/dataset.go @@ -53,8 +53,7 @@ func downloadDataSet(dataFolder string, force bool, reader io.Reader, logger *lo WithShelfLife(7 * 24 * time.Hour) } - // TODO: real context - ctx := context.Background() + ctx := context.TODO() downloaded, err := d.Download(ctx) if err != nil { diff --git a/pkg/cwhub/itemupgrade.go b/pkg/cwhub/itemupgrade.go index 004445df3..838efb0b6 100644 --- a/pkg/cwhub/itemupgrade.go +++ b/pkg/cwhub/itemupgrade.go @@ -130,9 +130,8 @@ func (i *Item) FetchContentTo(destPath string) (bool, string, error) { VerifyHash("sha256", wantHash) // TODO: recommend hub update if hash does not match - // TODO: use real context - ctx := context.Background() + ctx := context.TODO() downloaded, err := d.Download(ctx) if err != nil { diff --git a/pkg/cwhub/remote.go b/pkg/cwhub/remote.go index 4839e4971..04bfa816e 100644 --- a/pkg/cwhub/remote.go +++ b/pkg/cwhub/remote.go @@ -41,7 +41,7 @@ func (r *RemoteHubCfg) fetchIndex(destPath string) (bool, error) { return false, fmt.Errorf("failed to build hub index request: %w", err) } - ctx := context.Background() + ctx := context.TODO() downloaded, err := downloader. New(url).