1
0
mirror of https://github.com/rclone/rclone.git synced 2026-01-06 02:23:24 +00:00

Add context propagation to rclone

- Change rclone/fs interfaces to accept context.Context
- Update interface implementations to use context.Context
- Change top level usage to propagate context to lover level functions

Context propagation is needed for stopping transfers and passing other
request-scoped values.
This commit is contained in:
Aleksandar Jankovic
2019-06-17 10:34:30 +02:00
committed by Nick Craig-Wood
parent a2c317b46e
commit f78cd1e043
156 changed files with 2570 additions and 2380 deletions

View File

@@ -1,6 +1,7 @@
package about
import (
"context"
"encoding/json"
"fmt"
"os"
@@ -91,7 +92,7 @@ Use the --json flag for a computer readable output, eg
if doAbout == nil {
return errors.Errorf("%v doesn't support about", f)
}
u, err := doAbout()
u, err := doAbout(context.Background())
if err != nil {
return errors.Wrap(err, "About call failed")
}