Skip to content

Commit

Permalink
Update dependences
Browse files Browse the repository at this point in the history
  • Loading branch information
night-codes committed Dec 27, 2022
1 parent d9bba87 commit 1ee8c61
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 19 deletions.
14 changes: 8 additions & 6 deletions context.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package tokay

import (
"encoding/json"
"encoding/xml"
"fmt"
"mime/multipart"
Expand All @@ -11,8 +10,9 @@ import (
"strings"
"time"

"github.com/night-codes/go-json"
"github.com/night-codes/govalidator"
"github.com/night-codes/tokay-websocket"
websocket "github.com/night-codes/tokay-websocket"
"github.com/valyala/fasthttp"
)

Expand Down Expand Up @@ -88,9 +88,10 @@ func (c *Context) File(filepath string) {
}

// Websocket upgrades the HTTP server connection to the WebSocket protocol.
// conn, err := c.Websocket() // by default buffers size == 4096
// conn, err := c.Websocket(2048) // readBufSize & writeBufSize := 2048
// conn, err := c.Websocket(2048, 1024) // readBufSize := 2048, writeBufSize := 1024
//
// conn, err := c.Websocket() // by default buffers size == 4096
// conn, err := c.Websocket(2048) // readBufSize & writeBufSize := 2048
// conn, err := c.Websocket(2048, 1024) // readBufSize := 2048, writeBufSize := 1024
func (c *Context) Websocket(fn func(), bufferSizes ...int) error {
if len(bufferSizes) == 0 {
bufferSizes = append(bufferSizes, 4096, 4096)
Expand Down Expand Up @@ -276,7 +277,8 @@ func (c *Context) Abort() {

// AbortWithStatus calls `Abort()` and writes the headers with the specified status code.
// For example, a failed attempt to authenticate a request could use:
// context.AbortWithStatus(401).
//
// context.AbortWithStatus(401).
func (c *Context) AbortWithStatus(statusCode int) {
c.SetStatusCode(statusCode)
c.Abort()
Expand Down
5 changes: 3 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ module github.com/night-codes/tokay
go 1.16

require (
github.com/klauspost/compress v1.15.11 // indirect
github.com/klauspost/compress v1.15.13 // indirect
github.com/night-codes/go-json v0.9.14
github.com/night-codes/govalidator v1.0.4
github.com/night-codes/tokay-render v1.0.2
github.com/night-codes/tokay-websocket v1.0.0
github.com/stretchr/testify v1.7.0
github.com/valyala/fasthttp v1.40.0
github.com/valyala/fasthttp v1.43.0
)
20 changes: 9 additions & 11 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ github.com/andybalholm/brotli v1.0.4 h1:V7DdXeJtZscaqfNuAdSRuRFzuiKlHSC/Zh3zl9qY
github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/klauspost/compress v1.15.0 h1:xqfchp4whNFxn5A4XFyyYtitiWI8Hy5EW59jEwcyL6U=
github.com/klauspost/compress v1.15.0/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
github.com/klauspost/compress v1.15.11 h1:Lcadnb3RKGin4FYM/orgq0qde+nc15E5Cbqg4B9Sx9c=
github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM=
github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU=
github.com/klauspost/compress v1.15.13 h1:NFn1Wr8cfnenSJSA46lLq4wHCcBzKTSjnBIexDMMOV0=
github.com/klauspost/compress v1.15.13/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM=
github.com/night-codes/go-json v0.9.14 h1:6dYB1z4meV6FxB3pz6h7JPf+oU8L2rIrVuPvF8nPb84=
github.com/night-codes/go-json v0.9.14/go.mod h1:nclu/c6rESismpG7dYc3A67SVYNFm6R3LY4BDOar4+E=
github.com/night-codes/govalidator v1.0.4 h1:MPPrWKLDw0P1Dunqgoh4VCiOq8jjpW1RqjQ3XYQE52Q=
github.com/night-codes/govalidator v1.0.4/go.mod h1:698OUuzQEHaly/WE4iDX2Zq9XUD9tlIubaKTtqDgJvE=
github.com/night-codes/tokay-render v1.0.2 h1:llMZ9rqk7qcJdYxKKiXLTwgckmJjp6/jTDjYi/JHSx0=
Expand All @@ -19,19 +20,16 @@ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5Cc
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
github.com/valyala/fasthttp v1.34.0 h1:d3AAQJ2DRcxJYHm7OXNXtXt2as1vMDfxeIcFvhmGGm4=
github.com/valyala/fasthttp v1.34.0/go.mod h1:epZA5N+7pY6ZaEKRmstzOuYJx9HI8DI1oaCGZpdH4h0=
github.com/valyala/fasthttp v1.40.0 h1:CRq/00MfruPGFLTQKY8b+8SfdK60TxNztjRMnH0t1Yc=
github.com/valyala/fasthttp v1.40.0/go.mod h1:t/G+3rLek+CyY9bnIE+YlMRddxVAAGjhxndDB4i4C0I=
github.com/valyala/fasthttp v1.43.0 h1:Gy4sb32C98fbzVWZlTM1oTMdLWGyvxR03VhM6cBIU4g=
github.com/valyala/fasthttp v1.43.0/go.mod h1:f6VbjjoI3z1NDOZOv17o6RvtRSWxC77seBFc2uWtgiY=
github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc=
golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.0.0-20220906165146-f3363e06e74c/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
Expand Down

0 comments on commit 1ee8c61

Please sign in to comment.