Skip to content
This repository has been archived by the owner on Apr 16, 2020. It is now read-only.

Commit

Permalink
chore: update modules
Browse files Browse the repository at this point in the history
  • Loading branch information
vicanso committed Jan 1, 2020
1 parent 2f0f5a4 commit 4d4616c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (

func main() {

d := elton.New()
e := elton.New()
m := new(sync.Map)
limit := concurrentLimiter.New(concurrentLimiter.Config{
Keys: []string{
Expand All @@ -49,13 +49,16 @@ func main() {
},
})

d.POST("/login", limit, func(c *elton.Context) (err error) {
e.POST("/login", limit, func(c *elton.Context) (err error) {
time.Sleep(3 * time.Second)
c.BodyBuffer = bytes.NewBufferString("hello world")
return
})

d.ListenAndServe(":3000")
err := e.ListenAndServe(":3000")
if err != nil {
panic(err)
})
}
```

Expand Down
6 changes: 3 additions & 3 deletions example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

func main() {

d := elton.New()
e := elton.New()
m := new(sync.Map)
limit := concurrentLimiter.New(concurrentLimiter.Config{
Keys: []string{
Expand All @@ -35,13 +35,13 @@ func main() {
},
})

d.POST("/login", limit, func(c *elton.Context) (err error) {
e.POST("/login", limit, func(c *elton.Context) (err error) {
time.Sleep(3 * time.Second)
c.BodyBuffer = bytes.NewBufferString("hello world")
return
})

err := d.ListenAndServe(":3000")
err := e.ListenAndServe(":3000")
if err != nil {
panic(err)
}
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ module github.com/vicanso/elton-concurrent-limiter
go 1.12

require (
github.com/json-iterator/go v1.1.8
github.com/json-iterator/go v1.1.9
github.com/stretchr/testify v1.4.0
github.com/vicanso/elton v0.2.2
github.com/vicanso/elton v0.2.3
github.com/vicanso/hes v0.2.1
)
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/json-iterator/go v1.1.8 h1:QiWkFLKq0T7mpzwOTu6BzNDbfTE8OLrYhVKYMLF46Ok=
github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGns=
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U=
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc=
Expand All @@ -16,8 +16,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/vicanso/elton v0.2.2 h1:MZ5nfJFKBWDWnFPO8wRyPat8kZz3KoNBY0scemo7RFQ=
github.com/vicanso/elton v0.2.2/go.mod h1:QFZ+Un4LLBANtl0mExkqLD4uqw3JLA2ZCWUHaCsHOUg=
github.com/vicanso/elton v0.2.3 h1:XQskGFtw/hhtNXRU7dLX0OFcpG64pK4PMXh9CVjHVbA=
github.com/vicanso/elton v0.2.3/go.mod h1:QFZ+Un4LLBANtl0mExkqLD4uqw3JLA2ZCWUHaCsHOUg=
github.com/vicanso/hes v0.2.1 h1:jRFEADmiQ30koVY/sKwlkhyXM5B3QbVVizLqrjNJgPw=
github.com/vicanso/hes v0.2.1/go.mod h1:QcxOFmFfBQMhASTaLgnFayXYCgevdSeBVprt+o+3eKo=
github.com/vicanso/intranet-ip v0.0.1 h1:cYS+mExFsKqewWSuHtFwAqw/CO66GsheB/P1BPmSTx0=
Expand Down

0 comments on commit 4d4616c

Please sign in to comment.