Skip to content

Commit c277882

Browse files
author
Dean Karn
authored
update deps (#14)
1 parent 933f152 commit c277882

File tree

5 files changed

+47
-60
lines changed

5 files changed

+47
-60
lines changed

.github/workflows/go.yml

+15-12
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,35 @@ jobs:
44
test:
55
strategy:
66
matrix:
7-
go-version: [1.15.x,1.14.x,1.13.x]
7+
go-version: [1.17.x,1.20.x]
88
platform: [ubuntu-latest, macos-latest, windows-latest]
99
runs-on: ${{ matrix.platform }}
1010
steps:
1111
- name: Install Go
12-
uses: actions/setup-go@v1
12+
uses: actions/setup-go@v3
1313
with:
1414
go-version: ${{ matrix.go-version }}
1515

1616
- name: Priming Cache
17-
uses: actions/cache@v1
17+
uses: actions/cache@v3
1818
with:
1919
path: ~/go/pkg/mod
2020
key: ${{ runner.os }}-v1-go-${{ hashFiles('**/go.sum') }}
2121
restore-keys: |
2222
${{ runner.os }}-v1-go-
2323
2424
- name: Checkout code
25-
uses: actions/checkout@v2
26-
27-
- name: Lint
28-
if: matrix.platform == 'ubuntu-latest' && matrix.go-version == '1.15.x'
29-
run: |
30-
export PATH=$PATH:$(go env GOPATH)/bin # temporary fix. See https://github.com/actions/setup-go/issues/14
31-
go get -u golang.org/x/lint/golint
32-
golint -set_exit_status ./...
25+
uses: actions/checkout@v3
3326

3427
- name: Test
35-
run: go test ./...
28+
run: go test ./...
29+
30+
golangci:
31+
name: lint
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v3
35+
- name: golangci-lint
36+
uses: golangci/golangci-lint-action@v3
37+
with:
38+
version: latest

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
GOCMD=GO111MODULE=on go
22

33
lint:
4-
golint -set_exit_status ./...
4+
golangci-lint run
55

66
test:
77
$(GOCMD) test -cover -race ./...

README.md

+20-29
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package pure
22
============
3-
<img align="right" src="https://raw.githubusercontent.com/go-playground/pure/master/logo.png">![Project status](https://img.shields.io/badge/version-5.2.0-green.svg)
3+
<img align="right" src="https://raw.githubusercontent.com/go-playground/pure/master/logo.png">![Project status](https://img.shields.io/badge/version-5.3.0-green.svg)
44
[![Build Status](https://travis-ci.org/go-playground/pure.svg?branch=master)](https://travis-ci.org/go-playground/pure)
55
[![Coverage Status](https://coveralls.io/repos/github/go-playground/pure/badge.svg?branch=master)](https://coveralls.io/github/go-playground/pure?branch=master)
66
[![Go Report Card](https://goreportcard.com/badge/github.com/go-playground/pure)](https://goreportcard.com/report/github.com/go-playground/pure)
@@ -163,7 +163,7 @@ Run on i5-7600 16 GB DDR4-2400 using Go version go1.12.5 darwin/amd64
163163
NOTICE: pure uses a custom version of [httprouter](https://github.com/julienschmidt/httprouter)'s radix tree, benchmarks can be found [here](https://github.com/deankarn/go-http-routing-benchmark/tree/pure-and-lars) the slowdown is with the use of the `context` package, as you can see when no SEO params are defined, and therefore no need to store anything in the context, it is faster than even lars.
164164

165165
```go
166-
go test -bench=. -benchmem=true
166+
go test -bench=. -benchmem=true ./...
167167
#GithubAPI Routes: 203
168168
Pure: 37096 Bytes
169169

@@ -178,35 +178,26 @@ go test -bench=. -benchmem=true
178178
Pure: 21096 Bytes
179179

180180

181-
BenchmarkPure_Param 10000000 184 ns/op 384 B/op 2 allocs/op
182-
BenchmarkPure_Param5 10000000 236 ns/op 384 B/op 2 allocs/op
183-
BenchmarkPure_Param20 5000000 393 ns/op 384 B/op 2 allocs/op
184-
BenchmarkPure_ParamWrite 5000000 240 ns/op 384 B/op 2 allocs/op
185-
BenchmarkPure_GithubStatic 50000000 36.2 ns/op 0 B/op 0 allocs/op
186-
BenchmarkPureGithubParam 10000000 230 ns/op 384 B/op 2 allocs/op
187-
BenchmarkPure_GithubAll 30000 43887 ns/op 64130 B/op 334 allocs/op
188-
BenchmarkPure_GPlusStatic 50000000 22.8 ns/op 0 B/op 0 allocs/op
189-
BenchmarkPure_GPlusParam 10000000 192 ns/op 384 B/op 2 allocs/op
190-
BenchmarkPure_GPlus2Params 10000000 211 ns/op 384 B/op 2 allocs/op
191-
BenchmarkPure_GPlusAll 500000 2457 ns/op 4224 B/op 22 allocs/op
192-
BenchmarkPure_ParseStatic 100000000 23.7 ns/op 0 B/op 0 allocs/op
193-
BenchmarkPure_ParseParam 10000000 177 ns/op 384 B/op 2 allocs/op
194-
BenchmarkPure_Parse2Params 10000000 193 ns/op 384 B/op 2 allocs/op
195-
BenchmarkPure_ParseAll 500000 3751 ns/op 6144 B/op 32 allocs/op
196-
BenchmarkPure_StaticAll 200000 8574 ns/op 0 B/op 0 allocs/op
181+
goos: darwin
182+
goarch: arm64
183+
BenchmarkPure_Param 11965519 100.4 ns/op 256 B/op 1 allocs/op
184+
BenchmarkPure_Param5 8756385 138.6 ns/op 256 B/op 1 allocs/op
185+
BenchmarkPure_Param20 4335284 276.5 ns/op 256 B/op 1 allocs/op
186+
BenchmarkPure_ParamWrite 9980685 120.0 ns/op 256 B/op 1 allocs/op
187+
BenchmarkPure_GithubStatic 47743062 24.77 ns/op 0 B/op 0 allocs/op
188+
BenchmarkPure_GithubParam 8514968 139.8 ns/op 256 B/op 1 allocs/op
189+
BenchmarkPure_GithubAll 42250 28333 ns/op 42753 B/op 167 allocs/op
190+
BenchmarkPure_GPlusStatic 87363000 13.39 ns/op 0 B/op 0 allocs/op
191+
BenchmarkPure_GPlusParam 10398274 113.0 ns/op 256 B/op 1 allocs/op
192+
BenchmarkPure_GPlus2Params 9235220 128.7 ns/op 256 B/op 1 allocs/op
193+
BenchmarkPure_GPlusAll 792037 1526 ns/op 2816 B/op 11 allocs/op
194+
BenchmarkPure_ParseStatic 79194198 14.96 ns/op 0 B/op 0 allocs/op
195+
BenchmarkPure_ParseParam 11391336 104.5 ns/op 256 B/op 1 allocs/op
196+
BenchmarkPure_Parse2Params 10103078 116.2 ns/op 256 B/op 1 allocs/op
197+
BenchmarkPure_ParseAll 498306 2417 ns/op 4096 B/op 16 allocs/op
198+
BenchmarkPure_StaticAll 219930 5225 ns/op 0 B/op 0 allocs/op
197199
```
198200

199-
Package Versioning
200-
----------
201-
I'm jumping on the vendoring bandwagon, you should vendor this package as I will not
202-
be creating different version with gopkg.in like allot of my other libraries.
203-
204-
Why? because my time is spread pretty thin maintaining all of the libraries I have + LIFE,
205-
it is so freeing not to worry about it and will help me keep pouring out bigger and better
206-
things for you the community.
207-
208-
I am open versioning with gopkg.in should anyone request it, but this should be stable going forward.
209-
210201
Licenses
211202
--------
212203
- [MIT License](https://raw.githubusercontent.com/go-playground/pure/master/LICENSE) (MIT), Copyright (c) 2016 Dean Karn

go.mod

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
module github.com/go-playground/pure/v5
22

33
require (
4-
github.com/go-playground/assert/v2 v2.0.1
5-
github.com/go-playground/pkg/v5 v5.2.0
4+
github.com/go-playground/assert/v2 v2.2.0
5+
github.com/go-playground/pkg/v5 v5.21.1
66
)
77

8-
go 1.15
8+
require github.com/go-playground/form/v4 v4.2.0 // indirect
9+
10+
go 1.18

go.sum

+6-15
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,7 @@
1-
github.com/go-playground/assert v1.2.1 h1:ad06XqC+TOv0nJWnbULSlh3ehp5uLuQEojZY5Tq8RgI=
2-
github.com/go-playground/assert v1.2.1/go.mod h1:Lgy+k19nOB/wQG/fVSQ7rra5qYugmytMQqvQ2dgjWn8=
3-
github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A=
41
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
5-
github.com/go-playground/form/v4 v4.0.0 h1:vUKi2K1Hqlc4rpBc0tCclgs9zSfbY5yMKsL106db/eY=
6-
github.com/go-playground/form/v4 v4.0.0/go.mod h1:bodWfd97U9PVMZFcDsbVzSbQQTtaWrebnTwQtWjSW1M=
7-
github.com/go-playground/form/v4 v4.1.1 h1:1T9lGt3WRHuDwT5uwx7RYQZfxVwWZhF0DC1ovKyNnWY=
8-
github.com/go-playground/form/v4 v4.1.1/go.mod h1:q1a2BY+AQUUzhl6xA/6hBetay6dEIhMHjgvJiGo6K7U=
9-
github.com/go-playground/pkg v1.0.1 h1:EsBCgjDTrlaLCflFChT2Q/M4unQQS6DnBDvHTA+fVAI=
10-
github.com/go-playground/pkg v1.0.1/go.mod h1:P1pn/auRkxPy9n7eXlvyyJpBIvxdH6ZUtHOGOLfBaBA=
11-
github.com/go-playground/pkg/v4 v4.0.0 h1:0lTr9H8RyCwom4TcfNhMCNvlTlFuin7uUlXcZQuxrA4=
12-
github.com/go-playground/pkg/v4 v4.0.0/go.mod h1:TLowM3d3a/m04JlHK/zM6Ia8zf8+0C/9pTwhDEUqKO0=
13-
github.com/go-playground/pkg/v5 v5.1.0 h1:odCGeJgAQFjoU8eMfT0jjqeMoa4KspymUIq+vi5NpEk=
14-
github.com/go-playground/pkg/v5 v5.1.0/go.mod h1:0380E0lsFB1POWFypOLL8tX2f0O1OBCBpSdVmEy4mg0=
15-
github.com/go-playground/pkg/v5 v5.2.0 h1:rjauo+ugKwbpX/wxGdhLQHMba2PMwtOXhB5HdV9l3Ow=
16-
github.com/go-playground/pkg/v5 v5.2.0/go.mod h1:4JbhbKhH362Z8RQ7XBVlvysNbGUNgiMVo2Iuyy36qhc=
2+
github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
3+
github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
4+
github.com/go-playground/form/v4 v4.2.0 h1:N1wh+Goz61e6w66vo8vJkQt+uwZSoLz50kZPJWR8eic=
5+
github.com/go-playground/form/v4 v4.2.0/go.mod h1:q1a2BY+AQUUzhl6xA/6hBetay6dEIhMHjgvJiGo6K7U=
6+
github.com/go-playground/pkg/v5 v5.21.1 h1:X5yWP+S+wMFHBX1mUMCgsum3yw0FKaabd9vs27xjilg=
7+
github.com/go-playground/pkg/v5 v5.21.1/go.mod h1:eT8XZeFHnqZkfkpkbI8ayjfCw9GohV2/j8STbVmoR6s=

0 commit comments

Comments
 (0)