Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: go
go:
- 1.12.5
- 1.13.4
- tip
matrix:
allow_failures:
Expand All @@ -15,13 +15,12 @@ notifications:
before_install:
- go get -u github.com/go-playground/overalls
- go get -u github.com/mattn/goveralls
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s v1.16.0

script:
- make test
- ./bin/golangci-lint run
- make lint

after_success: |
[ $TRAVIS_GO_VERSION = 1.12.5 ] &&
[ $TRAVIS_GO_VERSION = 1.13.4 ] &&
overalls -project="github.com/go-playground/pure" -covermode=count -ignore=.git,examples -debug &&
goveralls -coverprofile=overalls.coverprofile -service travis-ci -repotoken $COVERALLS_TOKEN
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ GOCMD=GO111MODULE=on go
linters-install:
@golangci-lint --version >/dev/null 2>&1 || { \
echo "installing linting tools..."; \
$(GOCMD) get github.com/golangci/golangci-lint/cmd/golangci-lint; \
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s v1.21.0; \
}

lint: linters-install
golangci-lint run
$(PWD)/bin/golangci-lint run

test:
$(GOCMD) test -cover -race ./...
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package pure
============
<img align="right" src="https://raw.githubusercontent.com/go-playground/pure/master/logo.png">![Project status](https://img.shields.io/badge/version-5.0.3-green.svg)
<img align="right" src="https://raw.githubusercontent.com/go-playground/pure/master/logo.png">![Project status](https://img.shields.io/badge/version-5.0.4-green.svg)
[![Build Status](https://travis-ci.org/go-playground/pure.svg?branch=master)](https://travis-ci.org/go-playground/pure)
[![Coverage Status](https://coveralls.io/repos/github/go-playground/pure/badge.svg?branch=master)](https://coveralls.io/github/go-playground/pure?branch=master)
[![Go Report Card](https://goreportcard.com/badge/github.com/go-playground/pure)](https://goreportcard.com/report/github.com/go-playground/pure)
Expand All @@ -11,7 +11,7 @@ package pure
Pure is a fast radix-tree based HTTP router that sticks to the native implementations of Go's "net/http" package;
in essence, keeping the handler implementations 'pure' by using Go 1.7's "context" package.

This makes heavy usage of `github.com/go-playground/pkg` for HTTP abstractions.
This makes heavy usage of `github.com/go-playground/pkg/v4` for HTTP abstractions.

Why Another HTTP Router?
------------------------
Expand All @@ -28,7 +28,7 @@ Installation
Use go get

```shell
go get -u github.com/go-playground/pure
go get -u github.com/go-playground/pure/v5
```

Usage
Expand All @@ -39,8 +39,8 @@ package main
import (
"net/http"

"github.com/go-playground/pure"
mw "github.com/go-playground/pure/_examples/middleware/logging-recovery"
"github.com/go-playground/pure/v5"
mw "github.com/go-playground/pure/v5/_examples/middleware/logging-recovery"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions _examples/basic/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package main
import (
"net/http"

"github.com/go-playground/pure"
mw "github.com/go-playground/pure/_examples/middleware/logging-recovery"
"github.com/go-playground/pure/v5"
mw "github.com/go-playground/pure/v5/_examples/middleware/logging-recovery"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion _examples/middleware/logging-recovery/logging_recovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"time"

"github.com/go-playground/ansi"
"github.com/go-playground/pure"
"github.com/go-playground/pure/v5"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions _examples/params/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package main
import (
"net/http"

"github.com/go-playground/pure"
mw "github.com/go-playground/pure/_examples/middleware/logging-recovery"
"github.com/go-playground/pure/v5"
mw "github.com/go-playground/pure/v5/_examples/middleware/logging-recovery"
)

func main() {
Expand Down
8 changes: 5 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module github.com/go-playground/pure
module github.com/go-playground/pure/v5

require (
github.com/go-playground/pkg v0.0.0-20190522230805-792a755e6910
gopkg.in/go-playground/assert.v1 v1.2.1
github.com/go-playground/assert/v2 v2.0.1
github.com/go-playground/pkg/v4 v4.0.0
)

go 1.13
23 changes: 8 additions & 15 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
github.com/go-playground/form v3.1.4+incompatible h1:lvKiHVxE2WvzDIoyMnWcjyiBxKt2+uFJyZcPYWsLnjI=
github.com/go-playground/form v3.1.4+incompatible/go.mod h1:lhcKXfTuhRtIZCIKUeJ0b5F207aeQCPbZU09ScKjwWg=
github.com/go-playground/pkg v0.0.0-20190511145249-fa4bcb050f1d h1:dLyXECWWFoQAp49e+ayPJyTcVAVOSAEmZ/QALeOuIfg=
github.com/go-playground/pkg v0.0.0-20190511145249-fa4bcb050f1d/go.mod h1:Wg1j+HqWLhhVIfYdaoOuBzdutBEVcqwvBxgFZRWbybk=
github.com/go-playground/pkg v0.0.0-20190513231740-fa00488a1202 h1:jcKZzz6ZD5IIQCG6TqMSvo/316htYd0fUz6zBXXUexE=
github.com/go-playground/pkg v0.0.0-20190513231740-fa00488a1202/go.mod h1:Wg1j+HqWLhhVIfYdaoOuBzdutBEVcqwvBxgFZRWbybk=
github.com/go-playground/pkg v0.0.0-20190513234448-af45a46936e9 h1:SMJgXE/ouCVX21NWAS6yfOmwPn8HvT1Ty4UAGWGr60w=
github.com/go-playground/pkg v0.0.0-20190513234448-af45a46936e9/go.mod h1:Wg1j+HqWLhhVIfYdaoOuBzdutBEVcqwvBxgFZRWbybk=
github.com/go-playground/pkg v0.0.0-20190513235050-6cd3d118a436 h1:5FwEqhdQHGB+01ryvrBy2Uig1cYQ/U4GVTT6fVSEOhA=
github.com/go-playground/pkg v0.0.0-20190513235050-6cd3d118a436/go.mod h1:Wg1j+HqWLhhVIfYdaoOuBzdutBEVcqwvBxgFZRWbybk=
github.com/go-playground/pkg v0.0.0-20190522230805-792a755e6910 h1:h7toKaxfg9ttAloheYEndInQhXwOC/Knglt0L5MMVCM=
github.com/go-playground/pkg v0.0.0-20190522230805-792a755e6910/go.mod h1:Wg1j+HqWLhhVIfYdaoOuBzdutBEVcqwvBxgFZRWbybk=
github.com/go-playground/pkg v1.0.1 h1:EsBCgjDTrlaLCflFChT2Q/M4unQQS6DnBDvHTA+fVAI=
gopkg.in/go-playground/assert.v1 v1.2.1 h1:xoYuJVE7KT85PYWrN730RguIQO0ePzVRfFMXadIrXTM=
gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE=
github.com/go-playground/assert v1.2.1 h1:ad06XqC+TOv0nJWnbULSlh3ehp5uLuQEojZY5Tq8RgI=
github.com/go-playground/assert v1.2.1/go.mod h1:Lgy+k19nOB/wQG/fVSQ7rra5qYugmytMQqvQ2dgjWn8=
github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A=
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
github.com/go-playground/form/v4 v4.0.0 h1:vUKi2K1Hqlc4rpBc0tCclgs9zSfbY5yMKsL106db/eY=
github.com/go-playground/form/v4 v4.0.0/go.mod h1:bodWfd97U9PVMZFcDsbVzSbQQTtaWrebnTwQtWjSW1M=
github.com/go-playground/pkg/v4 v4.0.0 h1:0lTr9H8RyCwom4TcfNhMCNvlTlFuin7uUlXcZQuxrA4=
github.com/go-playground/pkg/v4 v4.0.0/go.mod h1:TLowM3d3a/m04JlHK/zM6Ia8zf8+0C/9pTwhDEUqKO0=
2 changes: 1 addition & 1 deletion group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"net/http/httptest"
"testing"

. "gopkg.in/go-playground/assert.v1"
. "github.com/go-playground/assert/v2"
)

// NOTES:
Expand Down
2 changes: 1 addition & 1 deletion helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"net/url"
"strings"

httpext "github.com/go-playground/pkg/net/http"
httpext "github.com/go-playground/pkg/v4/net/http"
)

// RequestVars returns the request scoped variables tracked by pure
Expand Down
4 changes: 2 additions & 2 deletions helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import (
"sync"
"testing"

httpext "github.com/go-playground/pkg/net/http"
httpext "github.com/go-playground/pkg/v4/net/http"

. "gopkg.in/go-playground/assert.v1"
. "github.com/go-playground/assert/v2"
)

// NOTES:
Expand Down
4 changes: 2 additions & 2 deletions middleware/gzip.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"strings"
"sync"

httpext "github.com/go-playground/pkg/net/http"
httpext "github.com/go-playground/pkg/v4/net/http"

"github.com/go-playground/pure"
"github.com/go-playground/pure/v5"
)

type gzipWriter struct {
Expand Down
6 changes: 3 additions & 3 deletions middleware/gzip_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import (
"net/http/httptest"
"testing"

httpext "github.com/go-playground/pkg/net/http"
httpext "github.com/go-playground/pkg/v4/net/http"

"github.com/go-playground/pure"
. "gopkg.in/go-playground/assert.v1"
. "github.com/go-playground/assert/v2"
"github.com/go-playground/pure/v5"
)

// NOTES:
Expand Down
2 changes: 1 addition & 1 deletion node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"net/http"
"testing"

. "gopkg.in/go-playground/assert.v1"
. "github.com/go-playground/assert/v2"
)

// NOTES:
Expand Down
2 changes: 1 addition & 1 deletion pure.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"
"sync"

httpext "github.com/go-playground/pkg/net/http"
httpext "github.com/go-playground/pkg/v4/net/http"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions pure_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"strconv"
"testing"

httpext "github.com/go-playground/pkg/net/http"
. "gopkg.in/go-playground/assert.v1"
. "github.com/go-playground/assert/v2"
httpext "github.com/go-playground/pkg/v4/net/http"
)

// NOTES:
Expand Down