mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 08:46:24 +08:00
Replace "golang.org/x/net/context" with "context" for go1.7+ #2154
This commit is contained in:
parent
67023f0040
commit
80588a5a6b
10
backend/cache/cache.go
vendored
10
backend/cache/cache.go
vendored
|
@ -3,18 +3,17 @@
|
|||
package cache
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"os/signal"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"os"
|
||||
|
||||
"os/signal"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"github.com/ncw/rclone/backend/crypt"
|
||||
"github.com/ncw/rclone/fs"
|
||||
|
@ -26,7 +25,6 @@ import (
|
|||
"github.com/ncw/rclone/fs/walk"
|
||||
"github.com/ncw/rclone/lib/atexit"
|
||||
"github.com/pkg/errors"
|
||||
"golang.org/x/net/context"
|
||||
"golang.org/x/time/rate"
|
||||
)
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
package sftp
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
|
@ -27,7 +28,6 @@ import (
|
|||
"github.com/pkg/sftp"
|
||||
"github.com/xanzy/ssh-agent"
|
||||
"golang.org/x/crypto/ssh"
|
||||
"golang.org/x/net/context"
|
||||
"golang.org/x/time/rate"
|
||||
)
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import (
|
|||
"github.com/ncw/rclone/fs/log"
|
||||
"github.com/ncw/rclone/vfs"
|
||||
"github.com/pkg/errors"
|
||||
"golang.org/x/net/context"
|
||||
"golang.org/x/net/context" // switch to "context" when we stop supporting go1.8
|
||||
)
|
||||
|
||||
// Dir represents a directory entry
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
"github.com/ncw/rclone/cmd/mountlib"
|
||||
"github.com/ncw/rclone/fs/log"
|
||||
"github.com/ncw/rclone/vfs"
|
||||
"golang.org/x/net/context"
|
||||
"golang.org/x/net/context" // switch to "context" when we stop supporting go1.8
|
||||
)
|
||||
|
||||
// File represents a file
|
||||
|
|
|
@ -14,7 +14,7 @@ import (
|
|||
"github.com/ncw/rclone/vfs"
|
||||
"github.com/ncw/rclone/vfs/vfsflags"
|
||||
"github.com/pkg/errors"
|
||||
"golang.org/x/net/context"
|
||||
"golang.org/x/net/context" // switch to "context" when we stop supporting go1.8
|
||||
)
|
||||
|
||||
// FS represents the top level filing system
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
fusefs "bazil.org/fuse/fs"
|
||||
"github.com/ncw/rclone/fs/log"
|
||||
"github.com/ncw/rclone/vfs"
|
||||
"golang.org/x/net/context"
|
||||
"golang.org/x/net/context" // switch to "context" when we stop supporting go1.8
|
||||
)
|
||||
|
||||
// FileHandle is an open for read file handle on a File
|
||||
|
|
|
@ -15,7 +15,7 @@ import (
|
|||
"github.com/ncw/rclone/vfs"
|
||||
"github.com/ncw/rclone/vfs/vfsflags"
|
||||
"github.com/spf13/cobra"
|
||||
"golang.org/x/net/context"
|
||||
"golang.org/x/net/context" // switch to "context" when we stop supporting go1.8
|
||||
"golang.org/x/net/webdav"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package accounting
|
||||
|
||||
import (
|
||||
"context"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/ncw/rclone/fs"
|
||||
"github.com/ncw/rclone/fs/rc"
|
||||
"github.com/pkg/errors"
|
||||
"golang.org/x/net/context" // switch to "context" when we stop supporting go1.6
|
||||
"golang.org/x/time/rate"
|
||||
)
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ package fshttp
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"crypto/tls"
|
||||
"net"
|
||||
"net/http"
|
||||
|
@ -12,7 +13,6 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/ncw/rclone/fs"
|
||||
"golang.org/x/net/context" // switch to "context" when we stop supporting go1.6
|
||||
"golang.org/x/time/rate"
|
||||
)
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
package march
|
||||
|
||||
import (
|
||||
"context"
|
||||
"path"
|
||||
"sort"
|
||||
"strings"
|
||||
|
@ -11,7 +12,6 @@ import (
|
|||
"github.com/ncw/rclone/fs/filter"
|
||||
"github.com/ncw/rclone/fs/list"
|
||||
"github.com/ncw/rclone/fs/walk"
|
||||
"golang.org/x/net/context"
|
||||
"golang.org/x/text/unicode/norm"
|
||||
)
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ package operations
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
|
@ -26,7 +27,6 @@ import (
|
|||
"github.com/ncw/rclone/lib/readers"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/pflag"
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
// CheckHashes checks the two files to see if they have common
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
package sync
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"sort"
|
||||
"sync"
|
||||
|
@ -14,7 +15,6 @@ import (
|
|||
"github.com/ncw/rclone/fs/march"
|
||||
"github.com/ncw/rclone/fs/operations"
|
||||
"github.com/pkg/errors"
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
type syncCopyMove struct {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package oauthutil
|
||||
|
||||
import (
|
||||
"context"
|
||||
"crypto/rand"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
@ -16,7 +17,6 @@ import (
|
|||
"github.com/ncw/rclone/fs/fshttp"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/skratchdot/open-golang/open"
|
||||
"golang.org/x/net/context"
|
||||
"golang.org/x/oauth2"
|
||||
)
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
package vfs
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"path"
|
||||
|
@ -17,7 +18,6 @@ import (
|
|||
"github.com/ncw/rclone/fs"
|
||||
"github.com/ncw/rclone/fs/config"
|
||||
"github.com/pkg/errors"
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
// CacheMode controls the functionality of the cache
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package vfs
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
|
@ -14,7 +15,6 @@ import (
|
|||
"github.com/spf13/pflag"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"golang.org/x/net/context" // switch to "context" when we stop supporting go1.6
|
||||
)
|
||||
|
||||
// Check CacheMode it satisfies the pflag interface
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
package vfs
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"path"
|
||||
|
@ -28,7 +29,6 @@ import (
|
|||
|
||||
"github.com/ncw/rclone/fs"
|
||||
"github.com/ncw/rclone/fs/log"
|
||||
"golang.org/x/net/context" // switch to "context" when we stop supporting go1.6
|
||||
)
|
||||
|
||||
// DefaultOpt is the default values uses for Opt
|
||||
|
|
Loading…
Reference in New Issue
Block a user