Skip to content

Commit

Permalink
using go 1.8 context
Browse files Browse the repository at this point in the history
  • Loading branch information
Will Dixon committed Jun 9, 2017
1 parent 447ce20 commit 6ce285d
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion bench/routers/bench_api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/rs/xhandler"

"golang.org/x/net/context"
"context"
)

// Parse API
Expand Down
3 changes: 2 additions & 1 deletion bench/routers/bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ import (
"regexp"
"testing"

"context"

"github.com/julienschmidt/httprouter"
"github.com/pressly/chi"
"github.com/rs/xhandler"
"github.com/rs/xmux"
goji "github.com/zenazn/goji/web"
"golang.org/x/net/context"
)

var benchRe *regexp.Regexp
Expand Down
3 changes: 2 additions & 1 deletion group_example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import (
"log"
"net/http"

"context"

"github.com/rs/xhandler"
"github.com/rs/xmux"
"golang.org/x/net/context"
)

func ExampleMux_NewGroup() {
Expand Down
3 changes: 2 additions & 1 deletion group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import (
"net/http"
"testing"

"context"

"github.com/rs/xhandler"
"github.com/stretchr/testify/assert"
"golang.org/x/net/context"
)

func TestRouteGroupOfARouteGroup(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion mux.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ import (

"github.com/rs/xhandler"

"golang.org/x/net/context"
"context"
)

// Mux is a xhandler.HandlerC which can be used to dispatch requests to different
Expand Down
3 changes: 2 additions & 1 deletion mux_example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import (
"net/http"
"time"

"context"

"github.com/rs/xhandler"
"github.com/rs/xmux"
"golang.org/x/net/context"
)

func ExampleMux() {
Expand Down
2 changes: 1 addition & 1 deletion mux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/rs/xhandler"
"github.com/stretchr/testify/assert"

"golang.org/x/net/context"
"context"
)

type mockResponseWriter struct{}
Expand Down
2 changes: 1 addition & 1 deletion testing.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package xmux

import "golang.org/x/net/context"
import "context"

// TestSetParamContext sets ParamHolder to context.Context for testing
func TestSetParamContext(ctx context.Context, p ParamHolder) context.Context {
Expand Down
2 changes: 1 addition & 1 deletion tree_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

"github.com/rs/xhandler"

"golang.org/x/net/context"
"context"
)

func printChildren(n *node, prefix string) {
Expand Down

0 comments on commit 6ce285d

Please sign in to comment.