From 9a728a127a10f6aa85cff53b6c78880450f04bba Mon Sep 17 00:00:00 2001 From: Brian Waldon Date: Thu, 20 Nov 2014 10:02:52 -0800 Subject: [PATCH 1/2] dep: bump golang.org/x/net/context Move from code.google.com/p/go.net/context to golang.org/x/net/context before bumping to latest. --- Godeps/Godeps.json | 10 ++++---- .../x/net}/context/context.go | 25 ++++++++++--------- .../x/net}/context/context_test.go | 2 +- .../x/net}/context/withtimeout_test.go | 2 +- client/http.go | 2 +- client/http_test.go | 2 +- client/keys.go | 2 +- client/members.go | 2 +- discovery/discovery.go | 2 +- discovery/discovery_test.go | 2 +- etcdctl/command/member_commands.go | 2 +- etcdserver/etcdhttp/client.go | 2 +- etcdserver/etcdhttp/client_test.go | 2 +- etcdserver/etcdhttp/http_test.go | 2 +- etcdserver/server.go | 2 +- etcdserver/server_test.go | 2 +- integration/cluster_test.go | 2 +- raft/node.go | 2 +- raft/node_bench_test.go | 2 +- raft/node_test.go | 2 +- rafthttp/http.go | 2 +- rafthttp/http_test.go | 2 +- 22 files changed, 38 insertions(+), 37 deletions(-) rename Godeps/_workspace/src/{code.google.com/p/go.net => golang.org/x/net}/context/context.go (96%) rename Godeps/_workspace/src/{code.google.com/p/go.net => golang.org/x/net}/context/context_test.go (99%) rename Godeps/_workspace/src/{code.google.com/p/go.net => golang.org/x/net}/context/withtimeout_test.go (88%) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 14f860aa7..308ddb778 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -5,11 +5,6 @@ "./..." ], "Deps": [ - { - "ImportPath": "code.google.com/p/go.net/context", - "Comment": "null-144", - "Rev": "ad01a6fcc8a19d3a4478c836895ffe883bd2ceab" - }, { "ImportPath": "code.google.com/p/gogoprotobuf/proto", "Rev": "7fd1620f09261338b6b1ca1289ace83aee0ec946" @@ -31,6 +26,11 @@ { "ImportPath": "github.com/stretchr/testify/assert", "Rev": "9cc77fa25329013ce07362c7742952ff887361f2" + }, + { + "ImportPath": "golang.org/x/net/context", + "Comment": "null-220", + "Rev": "c5a46024776ec35eb562fa9226968b9d543bb13a" } ] } diff --git a/Godeps/_workspace/src/code.google.com/p/go.net/context/context.go b/Godeps/_workspace/src/golang.org/x/net/context/context.go similarity index 96% rename from Godeps/_workspace/src/code.google.com/p/go.net/context/context.go rename to Godeps/_workspace/src/golang.org/x/net/context/context.go index e3c5345d7..66aff7cb4 100644 --- a/Godeps/_workspace/src/code.google.com/p/go.net/context/context.go +++ b/Godeps/_workspace/src/golang.org/x/net/context/context.go @@ -108,7 +108,7 @@ type Context interface { // // Package user defines a User type that's stored in Contexts. // package user // - // import "code.google.com/p/go.net/context" + // import "golang.org/x/net/context" // // // User is the type of value stored in the Contexts. // type User struct {...} @@ -124,7 +124,7 @@ type Context interface { // // // NewContext returns a new Context that carries value u. // func NewContext(ctx context.Context, u *User) context.Context { - // return context.WithValue(userKey, u) + // return context.WithValue(ctx, userKey, u) // } // // // FromContext returns the User value stored in ctx, if any. @@ -142,27 +142,28 @@ var Canceled = errors.New("context canceled") // deadline passes. var DeadlineExceeded = errors.New("context deadline exceeded") -// An emptyCtx is never canceled, has no values, and has no deadline. +// An emptyCtx is never canceled, has no values, and has no deadline. It is not +// struct{}, since vars of this type must have distinct addresses. type emptyCtx int -func (emptyCtx) Deadline() (deadline time.Time, ok bool) { +func (*emptyCtx) Deadline() (deadline time.Time, ok bool) { return } -func (emptyCtx) Done() <-chan struct{} { +func (*emptyCtx) Done() <-chan struct{} { return nil } -func (emptyCtx) Err() error { +func (*emptyCtx) Err() error { return nil } -func (emptyCtx) Value(key interface{}) interface{} { +func (*emptyCtx) Value(key interface{}) interface{} { return nil } -func (n emptyCtx) String() string { - switch n { +func (e *emptyCtx) String() string { + switch e { case background: return "context.Background" case todo: @@ -171,9 +172,9 @@ func (n emptyCtx) String() string { return "unknown empty Context" } -const ( - background emptyCtx = 1 - todo emptyCtx = 2 +var ( + background = new(emptyCtx) + todo = new(emptyCtx) ) // Background returns a non-nil, empty Context. It is never canceled, has no diff --git a/Godeps/_workspace/src/code.google.com/p/go.net/context/context_test.go b/Godeps/_workspace/src/golang.org/x/net/context/context_test.go similarity index 99% rename from Godeps/_workspace/src/code.google.com/p/go.net/context/context_test.go rename to Godeps/_workspace/src/golang.org/x/net/context/context_test.go index c1a4de5ff..82d2494a4 100644 --- a/Godeps/_workspace/src/code.google.com/p/go.net/context/context_test.go +++ b/Godeps/_workspace/src/golang.org/x/net/context/context_test.go @@ -365,7 +365,7 @@ func TestAllocs(t *testing.T) { c := WithValue(bg, k1, nil) c.Value(k1) }, - limit: 1, + limit: 3, gccgoLimit: 3, }, { diff --git a/Godeps/_workspace/src/code.google.com/p/go.net/context/withtimeout_test.go b/Godeps/_workspace/src/golang.org/x/net/context/withtimeout_test.go similarity index 88% rename from Godeps/_workspace/src/code.google.com/p/go.net/context/withtimeout_test.go rename to Godeps/_workspace/src/golang.org/x/net/context/withtimeout_test.go index c5a1da61e..04adc00f7 100644 --- a/Godeps/_workspace/src/code.google.com/p/go.net/context/withtimeout_test.go +++ b/Godeps/_workspace/src/golang.org/x/net/context/withtimeout_test.go @@ -8,7 +8,7 @@ import ( "fmt" "time" - "github.com/coreos/etcd/Godeps/_workspace/src/code.google.com/p/go.net/context" + "github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/net/context" ) func ExampleWithTimeout() { diff --git a/client/http.go b/client/http.go index 73649ef59..6d5943019 100644 --- a/client/http.go +++ b/client/http.go @@ -24,7 +24,7 @@ import ( "net/url" "time" - "github.com/coreos/etcd/Godeps/_workspace/src/code.google.com/p/go.net/context" + "github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/net/context" ) var ( diff --git a/client/http_test.go b/client/http_test.go index a1ebca4c1..dd89d32e3 100644 --- a/client/http_test.go +++ b/client/http_test.go @@ -26,7 +26,7 @@ import ( "testing" "time" - "github.com/coreos/etcd/Godeps/_workspace/src/code.google.com/p/go.net/context" + "github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/net/context" ) type staticHTTPClient struct { diff --git a/client/keys.go b/client/keys.go index 252c599cf..ffa6bf088 100644 --- a/client/keys.go +++ b/client/keys.go @@ -27,7 +27,7 @@ import ( "strings" "time" - "github.com/coreos/etcd/Godeps/_workspace/src/code.google.com/p/go.net/context" + "github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/net/context" ) var ( diff --git a/client/members.go b/client/members.go index 0e44894da..7f99547de 100644 --- a/client/members.go +++ b/client/members.go @@ -24,7 +24,7 @@ import ( "net/url" "path" - "github.com/coreos/etcd/Godeps/_workspace/src/code.google.com/p/go.net/context" + "github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/net/context" "github.com/coreos/etcd/etcdserver/etcdhttp/httptypes" "github.com/coreos/etcd/pkg/types" ) diff --git a/discovery/discovery.go b/discovery/discovery.go index 0e4ef1ca6..1b50a291c 100644 --- a/discovery/discovery.go +++ b/discovery/discovery.go @@ -28,8 +28,8 @@ import ( "strings" "time" - "github.com/coreos/etcd/Godeps/_workspace/src/code.google.com/p/go.net/context" "github.com/coreos/etcd/Godeps/_workspace/src/github.com/jonboulle/clockwork" + "github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/net/context" "github.com/coreos/etcd/client" "github.com/coreos/etcd/pkg/types" ) diff --git a/discovery/discovery_test.go b/discovery/discovery_test.go index 05eacbf00..c32baca4f 100644 --- a/discovery/discovery_test.go +++ b/discovery/discovery_test.go @@ -26,8 +26,8 @@ import ( "testing" "time" - "github.com/coreos/etcd/Godeps/_workspace/src/code.google.com/p/go.net/context" "github.com/coreos/etcd/Godeps/_workspace/src/github.com/jonboulle/clockwork" + "github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/net/context" "github.com/coreos/etcd/client" ) diff --git a/etcdctl/command/member_commands.go b/etcdctl/command/member_commands.go index 7432b2b65..54aee1ef4 100644 --- a/etcdctl/command/member_commands.go +++ b/etcdctl/command/member_commands.go @@ -21,8 +21,8 @@ import ( "os" "strings" - "github.com/coreos/etcd/Godeps/_workspace/src/code.google.com/p/go.net/context" "github.com/coreos/etcd/Godeps/_workspace/src/github.com/codegangsta/cli" + "github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/net/context" "github.com/coreos/etcd/client" ) diff --git a/etcdserver/etcdhttp/client.go b/etcdserver/etcdhttp/client.go index e9e47ed7a..e3da5e0d1 100644 --- a/etcdserver/etcdhttp/client.go +++ b/etcdserver/etcdhttp/client.go @@ -29,8 +29,8 @@ import ( "strings" "time" - "github.com/coreos/etcd/Godeps/_workspace/src/code.google.com/p/go.net/context" "github.com/coreos/etcd/Godeps/_workspace/src/github.com/jonboulle/clockwork" + "github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/net/context" etcdErr "github.com/coreos/etcd/error" "github.com/coreos/etcd/etcdserver" "github.com/coreos/etcd/etcdserver/etcdhttp/httptypes" diff --git a/etcdserver/etcdhttp/client_test.go b/etcdserver/etcdhttp/client_test.go index 37a4c7823..210b4b7d8 100644 --- a/etcdserver/etcdhttp/client_test.go +++ b/etcdserver/etcdhttp/client_test.go @@ -31,8 +31,8 @@ import ( "testing" "time" - "github.com/coreos/etcd/Godeps/_workspace/src/code.google.com/p/go.net/context" "github.com/coreos/etcd/Godeps/_workspace/src/github.com/jonboulle/clockwork" + "github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/net/context" etcdErr "github.com/coreos/etcd/error" "github.com/coreos/etcd/etcdserver" "github.com/coreos/etcd/etcdserver/etcdhttp/httptypes" diff --git a/etcdserver/etcdhttp/http_test.go b/etcdserver/etcdhttp/http_test.go index da8ed5e46..6d73b51f6 100644 --- a/etcdserver/etcdhttp/http_test.go +++ b/etcdserver/etcdhttp/http_test.go @@ -24,7 +24,7 @@ import ( "sort" "testing" - "github.com/coreos/etcd/Godeps/_workspace/src/code.google.com/p/go.net/context" + "github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/net/context" etcdErr "github.com/coreos/etcd/error" "github.com/coreos/etcd/etcdserver" "github.com/coreos/etcd/etcdserver/etcdserverpb" diff --git a/etcdserver/server.go b/etcdserver/server.go index a65c70c3f..0ac91c57c 100644 --- a/etcdserver/server.go +++ b/etcdserver/server.go @@ -31,7 +31,7 @@ import ( "sync/atomic" "time" - "github.com/coreos/etcd/Godeps/_workspace/src/code.google.com/p/go.net/context" + "github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/net/context" "github.com/coreos/etcd/discovery" "github.com/coreos/etcd/etcdserver/etcdhttp/httptypes" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" diff --git a/etcdserver/server_test.go b/etcdserver/server_test.go index 863e92f4e..57bd39321 100644 --- a/etcdserver/server_test.go +++ b/etcdserver/server_test.go @@ -29,7 +29,7 @@ import ( "testing" "time" - "github.com/coreos/etcd/Godeps/_workspace/src/code.google.com/p/go.net/context" + "github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/net/context" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" "github.com/coreos/etcd/pkg/pbutil" "github.com/coreos/etcd/pkg/testutil" diff --git a/integration/cluster_test.go b/integration/cluster_test.go index e86be63db..208a58c3e 100644 --- a/integration/cluster_test.go +++ b/integration/cluster_test.go @@ -36,7 +36,7 @@ import ( "github.com/coreos/etcd/etcdserver/etcdhttp/httptypes" "github.com/coreos/etcd/pkg/types" - "github.com/coreos/etcd/Godeps/_workspace/src/code.google.com/p/go.net/context" + "github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/net/context" ) const ( diff --git a/raft/node.go b/raft/node.go index 274d89e52..2e5b1dd8d 100644 --- a/raft/node.go +++ b/raft/node.go @@ -21,7 +21,7 @@ import ( "log" "reflect" - "github.com/coreos/etcd/Godeps/_workspace/src/code.google.com/p/go.net/context" + "github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/net/context" pb "github.com/coreos/etcd/raft/raftpb" ) diff --git a/raft/node_bench_test.go b/raft/node_bench_test.go index 78891e4df..ab7cc103c 100644 --- a/raft/node_bench_test.go +++ b/raft/node_bench_test.go @@ -19,7 +19,7 @@ package raft import ( "testing" - "github.com/coreos/etcd/Godeps/_workspace/src/code.google.com/p/go.net/context" + "github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/net/context" ) func BenchmarkOneNode(b *testing.B) { diff --git a/raft/node_test.go b/raft/node_test.go index 0ad94d949..74d3b943a 100644 --- a/raft/node_test.go +++ b/raft/node_test.go @@ -21,7 +21,7 @@ import ( "testing" "time" - "github.com/coreos/etcd/Godeps/_workspace/src/code.google.com/p/go.net/context" + "github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/net/context" "github.com/coreos/etcd/pkg/testutil" "github.com/coreos/etcd/raft/raftpb" ) diff --git a/rafthttp/http.go b/rafthttp/http.go index 87ff9f924..5cf3e861b 100644 --- a/rafthttp/http.go +++ b/rafthttp/http.go @@ -24,7 +24,7 @@ import ( "github.com/coreos/etcd/pkg/types" "github.com/coreos/etcd/raft/raftpb" - "github.com/coreos/etcd/Godeps/_workspace/src/code.google.com/p/go.net/context" + "github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/net/context" ) type Processor interface { diff --git a/rafthttp/http_test.go b/rafthttp/http_test.go index e884d0118..954f399d3 100644 --- a/rafthttp/http_test.go +++ b/rafthttp/http_test.go @@ -29,7 +29,7 @@ import ( "github.com/coreos/etcd/pkg/types" "github.com/coreos/etcd/raft/raftpb" - "github.com/coreos/etcd/Godeps/_workspace/src/code.google.com/p/go.net/context" + "github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/net/context" ) func TestServeRaft(t *testing.T) { From da5538b8c78d5eb029837d546f5c2e07e6b7a2be Mon Sep 17 00:00:00 2001 From: Brian Waldon Date: Thu, 20 Nov 2014 10:06:16 -0800 Subject: [PATCH 2/2] dep: use vendored imports in codegangsta/cli --- Godeps/_workspace/src/github.com/codegangsta/cli/app_test.go | 2 +- Godeps/_workspace/src/github.com/codegangsta/cli/cli_test.go | 2 +- .../_workspace/src/github.com/codegangsta/cli/command_test.go | 2 +- .../_workspace/src/github.com/codegangsta/cli/context_test.go | 2 +- Godeps/_workspace/src/github.com/codegangsta/cli/flag_test.go | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Godeps/_workspace/src/github.com/codegangsta/cli/app_test.go b/Godeps/_workspace/src/github.com/codegangsta/cli/app_test.go index 81d11743e..3f98dd3c4 100644 --- a/Godeps/_workspace/src/github.com/codegangsta/cli/app_test.go +++ b/Godeps/_workspace/src/github.com/codegangsta/cli/app_test.go @@ -5,7 +5,7 @@ import ( "os" "testing" - "github.com/codegangsta/cli" + "github.com/coreos/etcd/Godeps/_workspace/src/github.com/codegangsta/cli" ) func ExampleApp() { diff --git a/Godeps/_workspace/src/github.com/codegangsta/cli/cli_test.go b/Godeps/_workspace/src/github.com/codegangsta/cli/cli_test.go index 879a793dc..59620377d 100644 --- a/Godeps/_workspace/src/github.com/codegangsta/cli/cli_test.go +++ b/Godeps/_workspace/src/github.com/codegangsta/cli/cli_test.go @@ -3,7 +3,7 @@ package cli_test import ( "os" - "github.com/codegangsta/cli" + "github.com/coreos/etcd/Godeps/_workspace/src/github.com/codegangsta/cli" ) func Example() { diff --git a/Godeps/_workspace/src/github.com/codegangsta/cli/command_test.go b/Godeps/_workspace/src/github.com/codegangsta/cli/command_test.go index c0f556ad2..de94b9125 100644 --- a/Godeps/_workspace/src/github.com/codegangsta/cli/command_test.go +++ b/Godeps/_workspace/src/github.com/codegangsta/cli/command_test.go @@ -4,7 +4,7 @@ import ( "flag" "testing" - "github.com/codegangsta/cli" + "github.com/coreos/etcd/Godeps/_workspace/src/github.com/codegangsta/cli" ) func TestCommandDoNotIgnoreFlags(t *testing.T) { diff --git a/Godeps/_workspace/src/github.com/codegangsta/cli/context_test.go b/Godeps/_workspace/src/github.com/codegangsta/cli/context_test.go index b2d241211..004307efd 100644 --- a/Godeps/_workspace/src/github.com/codegangsta/cli/context_test.go +++ b/Godeps/_workspace/src/github.com/codegangsta/cli/context_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/codegangsta/cli" + "github.com/coreos/etcd/Godeps/_workspace/src/github.com/codegangsta/cli" ) func TestNewContext(t *testing.T) { diff --git a/Godeps/_workspace/src/github.com/codegangsta/cli/flag_test.go b/Godeps/_workspace/src/github.com/codegangsta/cli/flag_test.go index bc5059ca1..56c64821c 100644 --- a/Godeps/_workspace/src/github.com/codegangsta/cli/flag_test.go +++ b/Godeps/_workspace/src/github.com/codegangsta/cli/flag_test.go @@ -7,7 +7,7 @@ import ( "strings" "testing" - "github.com/codegangsta/cli" + "github.com/coreos/etcd/Godeps/_workspace/src/github.com/codegangsta/cli" ) var boolFlagTests = []struct {