From 5ee70493128ff214db5ad624123e9fe66184d50a Mon Sep 17 00:00:00 2001 From: Arran Walker Date: Wed, 7 Feb 2018 15:12:44 +0000 Subject: [PATCH] replace imports of "golang.org/x/net/context" with "context" --- connection.go | 3 +-- fusetesting/parallel.go | 2 +- fuseutil/file_system.go | 3 +-- fuseutil/not_implemented_file_system.go | 3 ++- mount.go | 3 +-- mount_config.go | 3 +-- mount_test.go | 3 +-- mounted_file_system.go | 2 +- samples/cachingfs/caching_fs.go | 3 +-- samples/dynamicfs/dynamic_fs.go | 3 +-- samples/errorfs/error_fs.go | 3 +-- samples/flushfs/flush_fs.go | 3 +-- samples/forgetfs/forget_fs.go | 3 +-- samples/hellofs/hello_fs.go | 3 +-- samples/in_process.go | 2 +- samples/interruptfs/interrupt_fs.go | 3 +-- samples/memfs/memfs.go | 3 +-- samples/memfs/posix_test.go | 3 +-- samples/mount_sample/mount.go | 2 +- samples/statfs/statfs.go | 3 +-- samples/subprocess.go | 2 +- 21 files changed, 22 insertions(+), 36 deletions(-) diff --git a/connection.go b/connection.go index d28bf1a..d2e6ee7 100644 --- a/connection.go +++ b/connection.go @@ -15,6 +15,7 @@ package fuse import ( + "context" "fmt" "io" "log" @@ -24,8 +25,6 @@ import ( "sync" "syscall" - "golang.org/x/net/context" - "github.com/jacobsa/fuse/fuseops" "github.com/jacobsa/fuse/internal/buffer" "github.com/jacobsa/fuse/internal/freelist" diff --git a/fusetesting/parallel.go b/fusetesting/parallel.go index 4bb19fb..d8459e5 100644 --- a/fusetesting/parallel.go +++ b/fusetesting/parallel.go @@ -15,6 +15,7 @@ package fusetesting import ( + "context" "fmt" "io/ioutil" "os" @@ -25,7 +26,6 @@ import ( . "github.com/jacobsa/ogletest" "github.com/jacobsa/syncutil" - "golang.org/x/net/context" ) // Run an ogletest test that checks expectations for parallel calls to open(2) diff --git a/fuseutil/file_system.go b/fuseutil/file_system.go index 3a2a2cc..1ac9aac 100644 --- a/fuseutil/file_system.go +++ b/fuseutil/file_system.go @@ -15,11 +15,10 @@ package fuseutil import ( + "context" "io" "sync" - "golang.org/x/net/context" - "github.com/jacobsa/fuse" "github.com/jacobsa/fuse/fuseops" ) diff --git a/fuseutil/not_implemented_file_system.go b/fuseutil/not_implemented_file_system.go index 15cc1a0..c1a5f73 100644 --- a/fuseutil/not_implemented_file_system.go +++ b/fuseutil/not_implemented_file_system.go @@ -15,9 +15,10 @@ package fuseutil import ( + "context" + "github.com/jacobsa/fuse" "github.com/jacobsa/fuse/fuseops" - "golang.org/x/net/context" ) // A FileSystem that responds to all ops with fuse.ENOSYS. Embed this in your diff --git a/mount.go b/mount.go index 1226847..faa27e9 100644 --- a/mount.go +++ b/mount.go @@ -15,10 +15,9 @@ package fuse import ( + "context" "fmt" "os" - - "golang.org/x/net/context" ) // Server is an interface for any type that knows how to serve ops read from a diff --git a/mount_config.go b/mount_config.go index fda42b5..96e7910 100644 --- a/mount_config.go +++ b/mount_config.go @@ -15,12 +15,11 @@ package fuse import ( + "context" "fmt" "log" "runtime" "strings" - - "golang.org/x/net/context" ) // Optional configuration accepted by Mount. diff --git a/mount_test.go b/mount_test.go index f7c7edf..0ceb8d7 100644 --- a/mount_test.go +++ b/mount_test.go @@ -1,6 +1,7 @@ package fuse_test import ( + "context" "io/ioutil" "os" "path" @@ -8,8 +9,6 @@ import ( "strings" "testing" - "golang.org/x/net/context" - "github.com/jacobsa/fuse" "github.com/jacobsa/fuse/fuseops" "github.com/jacobsa/fuse/fuseutil" diff --git a/mounted_file_system.go b/mounted_file_system.go index 1e300e8..bb9bb35 100644 --- a/mounted_file_system.go +++ b/mounted_file_system.go @@ -14,7 +14,7 @@ package fuse -import "golang.org/x/net/context" +import "context" // MountedFileSystem represents the status of a mount operation, with a method // that waits for unmounting. diff --git a/samples/cachingfs/caching_fs.go b/samples/cachingfs/caching_fs.go index b7c7d3e..b7e0722 100644 --- a/samples/cachingfs/caching_fs.go +++ b/samples/cachingfs/caching_fs.go @@ -15,14 +15,13 @@ package cachingfs import ( + "context" "crypto/rand" "fmt" "io" "os" "time" - "golang.org/x/net/context" - "github.com/jacobsa/fuse" "github.com/jacobsa/fuse/fuseops" "github.com/jacobsa/fuse/fuseutil" diff --git a/samples/dynamicfs/dynamic_fs.go b/samples/dynamicfs/dynamic_fs.go index 7922389..ff1c979 100644 --- a/samples/dynamicfs/dynamic_fs.go +++ b/samples/dynamicfs/dynamic_fs.go @@ -1,6 +1,7 @@ package dynamicfs import ( + "context" "fmt" "io" "log" @@ -9,8 +10,6 @@ import ( "sync" "time" - "golang.org/x/net/context" - "github.com/jacobsa/fuse" "github.com/jacobsa/fuse/fuseops" "github.com/jacobsa/fuse/fuseutil" diff --git a/samples/errorfs/error_fs.go b/samples/errorfs/error_fs.go index 04d4c8b..5ced2a2 100644 --- a/samples/errorfs/error_fs.go +++ b/samples/errorfs/error_fs.go @@ -15,14 +15,13 @@ package errorfs import ( + "context" "fmt" "os" "reflect" "sync" "syscall" - "golang.org/x/net/context" - "github.com/jacobsa/fuse/fuseops" "github.com/jacobsa/fuse/fuseutil" ) diff --git a/samples/flushfs/flush_fs.go b/samples/flushfs/flush_fs.go index 4502510..3cf74c8 100644 --- a/samples/flushfs/flush_fs.go +++ b/samples/flushfs/flush_fs.go @@ -15,12 +15,11 @@ package flushfs import ( + "context" "fmt" "os" "sync" - "golang.org/x/net/context" - "github.com/jacobsa/fuse" "github.com/jacobsa/fuse/fuseops" "github.com/jacobsa/fuse/fuseutil" diff --git a/samples/forgetfs/forget_fs.go b/samples/forgetfs/forget_fs.go index 01ef35c..9595001 100644 --- a/samples/forgetfs/forget_fs.go +++ b/samples/forgetfs/forget_fs.go @@ -15,11 +15,10 @@ package forgetfs import ( + "context" "fmt" "os" - "golang.org/x/net/context" - "github.com/jacobsa/fuse" "github.com/jacobsa/fuse/fuseops" "github.com/jacobsa/fuse/fuseutil" diff --git a/samples/hellofs/hello_fs.go b/samples/hellofs/hello_fs.go index 36ea2f3..add2b38 100644 --- a/samples/hellofs/hello_fs.go +++ b/samples/hellofs/hello_fs.go @@ -15,12 +15,11 @@ package hellofs import ( + "context" "io" "os" "strings" - "golang.org/x/net/context" - "github.com/jacobsa/fuse" "github.com/jacobsa/fuse/fuseops" "github.com/jacobsa/fuse/fuseutil" diff --git a/samples/in_process.go b/samples/in_process.go index d7f92aa..b610039 100644 --- a/samples/in_process.go +++ b/samples/in_process.go @@ -15,6 +15,7 @@ package samples import ( + "context" "fmt" "io" "io/ioutil" @@ -25,7 +26,6 @@ import ( "github.com/jacobsa/fuse" "github.com/jacobsa/ogletest" "github.com/jacobsa/timeutil" - "golang.org/x/net/context" ) // A struct that implements common behavior needed by tests in the samples/ diff --git a/samples/interruptfs/interrupt_fs.go b/samples/interruptfs/interrupt_fs.go index d44f109..b23b8fd 100644 --- a/samples/interruptfs/interrupt_fs.go +++ b/samples/interruptfs/interrupt_fs.go @@ -15,12 +15,11 @@ package interruptfs import ( + "context" "fmt" "os" "sync" - "golang.org/x/net/context" - "github.com/jacobsa/fuse" "github.com/jacobsa/fuse/fuseops" "github.com/jacobsa/fuse/fuseutil" diff --git a/samples/memfs/memfs.go b/samples/memfs/memfs.go index ae5c337..c46387c 100644 --- a/samples/memfs/memfs.go +++ b/samples/memfs/memfs.go @@ -15,14 +15,13 @@ package memfs import ( + "context" "fmt" "io" "os" "syscall" "time" - "golang.org/x/net/context" - "github.com/jacobsa/fuse" "github.com/jacobsa/fuse/fuseops" "github.com/jacobsa/fuse/fuseutil" diff --git a/samples/memfs/posix_test.go b/samples/memfs/posix_test.go index 859f839..5b9680c 100644 --- a/samples/memfs/posix_test.go +++ b/samples/memfs/posix_test.go @@ -18,6 +18,7 @@ package memfs_test import ( + "context" "io" "io/ioutil" "os" @@ -25,8 +26,6 @@ import ( "runtime" "testing" - "golang.org/x/net/context" - "github.com/jacobsa/fuse/fusetesting" . "github.com/jacobsa/oglematchers" . "github.com/jacobsa/ogletest" diff --git a/samples/mount_sample/mount.go b/samples/mount_sample/mount.go index 5a25e12..6ab7290 100644 --- a/samples/mount_sample/mount.go +++ b/samples/mount_sample/mount.go @@ -17,6 +17,7 @@ package main import ( + "context" "errors" "flag" "fmt" @@ -27,7 +28,6 @@ import ( "github.com/jacobsa/fuse" "github.com/jacobsa/fuse/samples/flushfs" - "golang.org/x/net/context" ) var fType = flag.String("type", "", "The name of the samples/ sub-dir.") diff --git a/samples/statfs/statfs.go b/samples/statfs/statfs.go index 166c2d2..e552b13 100644 --- a/samples/statfs/statfs.go +++ b/samples/statfs/statfs.go @@ -15,11 +15,10 @@ package statfs import ( + "context" "os" "sync" - "golang.org/x/net/context" - "github.com/jacobsa/fuse" "github.com/jacobsa/fuse/fuseops" "github.com/jacobsa/fuse/fuseutil" diff --git a/samples/subprocess.go b/samples/subprocess.go index 5fb41f6..2b1c54b 100644 --- a/samples/subprocess.go +++ b/samples/subprocess.go @@ -16,6 +16,7 @@ package samples import ( "bytes" + "context" "flag" "fmt" "io" @@ -27,7 +28,6 @@ import ( "sync" "github.com/jacobsa/ogletest" - "golang.org/x/net/context" ) var fToolPath = flag.String(