1
0
mirror of https://github.com/rclone/rclone.git synced 2026-01-06 18:43:50 +00:00

fs: Add context to NewFs #3257 #4685

This adds a context.Context parameter to NewFs and related calls.

This is necessary as part of reading config from the context -
backends need to be able to read the global config.
This commit is contained in:
Nick Craig-Wood
2020-11-05 15:18:51 +00:00
parent 30c8b1b84f
commit d846210978
82 changed files with 231 additions and 227 deletions

View File

@@ -8,6 +8,7 @@
package ftp
import (
"context"
"testing"
_ "github.com/rclone/rclone/backend/local"
@@ -38,7 +39,7 @@ func TestFTP(t *testing.T) {
opt.BasicUser = testUSER
opt.BasicPass = testPASS
w, err := newServer(f, &opt)
w, err := newServer(context.Background(), f, &opt)
assert.NoError(t, err)
quit := make(chan struct{})