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-19 11:59:46 +01:00
committed by Nick Craig-Wood
parent a2c317b46e
commit f78cd1e043
156 changed files with 2570 additions and 2380 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
package ls
import (
"context"
"os"
"github.com/ncw/rclone/cmd"
@@ -33,7 +34,7 @@ Eg
cmd.CheckArgs(1, 1, command, args)
fsrc := cmd.NewFsSrc(args)
cmd.Run(false, false, command, func() error {
return operations.List(fsrc, os.Stdout)
return operations.List(context.Background(), fsrc, os.Stdout)
})
},
}