using go 1.8 context (#19)

master
Will Dixon 6 years ago committed by Olivier Poitrey
parent ed27b6fd65
commit e5560d3a47

@ -3,7 +3,7 @@ package xhandler
import (
"net/http"
"golang.org/x/net/context"
"context"
)
// Chain is a helper for chaining middleware handlers together for easier

@ -6,9 +6,10 @@ import (
"strings"
"time"
"context"
"github.com/rs/cors"
"github.com/rs/xhandler"
"golang.org/x/net/context"
)
func ExampleChain() {

@ -5,8 +5,9 @@ import (
"net/http/httptest"
"testing"
"context"
"github.com/stretchr/testify/assert"
"golang.org/x/net/context"
)
func TestAppendHandlerC(t *testing.T) {

@ -4,7 +4,7 @@ import (
"net/http"
"time"
"golang.org/x/net/context"
"context"
)
// CloseHandler returns a Handler, cancelling the context when the client

@ -7,8 +7,9 @@ import (
"testing"
"time"
"context"
"github.com/stretchr/testify/assert"
"golang.org/x/net/context"
)
func TestTimeoutHandler(t *testing.T) {

@ -14,7 +14,7 @@ package xhandler // import "github.com/rs/xhandler"
import (
"net/http"
"golang.org/x/net/context"
"context"
)
// HandlerC is a net/context aware http.Handler

@ -5,8 +5,9 @@ import (
"net/http"
"time"
"context"
"github.com/rs/xhandler"
"golang.org/x/net/context"
)
type key int

@ -7,8 +7,9 @@ import (
"testing"
"time"
"context"
"github.com/stretchr/testify/assert"
"golang.org/x/net/context"
)
type handler struct{}

Loading…
Cancel
Save