1
0
mirror of https://github.com/moby/moby.git synced 2025-08-01 05:47:11 +03:00

Use golang.org/x/net/context in api/server/

This patch removes the internal context package and uses golang's
package instead.

Signed-off-by: Tibor Vass <tibor@docker.com>
This commit is contained in:
Tibor Vass
2015-09-29 17:32:07 -04:00
parent b08f071e18
commit 94e3b0f428
14 changed files with 41 additions and 163 deletions

View File

@ -5,7 +5,7 @@ import (
"net/http/httptest"
"testing"
"github.com/docker/docker/context"
"golang.org/x/net/context"
)
func TestMiddlewares(t *testing.T) {
@ -19,12 +19,9 @@ func TestMiddlewares(t *testing.T) {
ctx := context.Background()
localHandler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
if ctx.Version() == "" {
if versionFromContext(ctx) == "" {
t.Fatalf("Expected version, got empty string")
}
if ctx.RequestID() == "" {
t.Fatalf("Expected request-id, got empty string")
}
return nil
}