Skip to content

Commit

Permalink
Update go version and package names
Browse files Browse the repository at this point in the history
  • Loading branch information
alei121 committed Feb 21, 2023
1 parent bb33494 commit 883dd8f
Show file tree
Hide file tree
Showing 54 changed files with 120 additions and 398 deletions.
3 changes: 2 additions & 1 deletion accept.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !js
// +build !js

package websocket
Expand All @@ -16,7 +17,7 @@ import (
"path/filepath"
"strings"

"nhooyr.io/websocket/internal/errd"
"github.com/cisco-pxgrid/websocket/internal/errd"
)

// AcceptOptions represents Accept's options.
Expand Down
3 changes: 2 additions & 1 deletion accept_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !js
// +build !js

package websocket
Expand All @@ -11,7 +12,7 @@ import (
"strings"
"testing"

"nhooyr.io/websocket/internal/test/assert"
"github.com/cisco-pxgrid/websocket/internal/test/assert"
)

func TestAccept(t *testing.T) {
Expand Down
9 changes: 5 additions & 4 deletions autobahn_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !js
// +build !js

package websocket_test
Expand All @@ -15,10 +16,10 @@ import (
"testing"
"time"

"nhooyr.io/websocket"
"nhooyr.io/websocket/internal/errd"
"nhooyr.io/websocket/internal/test/assert"
"nhooyr.io/websocket/internal/test/wstest"
"github.com/cisco-pxgrid/websocket"
"github.com/cisco-pxgrid/websocket/internal/errd"
"github.com/cisco-pxgrid/websocket/internal/test/assert"
"github.com/cisco-pxgrid/websocket/internal/test/wstest"
)

var excludedAutobahnCases = []string{
Expand Down
3 changes: 2 additions & 1 deletion close_notjs.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !js
// +build !js

package websocket
Expand All @@ -10,7 +11,7 @@ import (
"log"
"time"

"nhooyr.io/websocket/internal/errd"
"github.com/cisco-pxgrid/websocket/internal/errd"
)

// Close performs the WebSocket close handshake with the given status code and reason.
Expand Down
3 changes: 2 additions & 1 deletion close_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !js
// +build !js

package websocket
Expand All @@ -8,7 +9,7 @@ import (
"strings"
"testing"

"nhooyr.io/websocket/internal/test/assert"
"github.com/cisco-pxgrid/websocket/internal/test/assert"
)

func TestCloseError(t *testing.T) {
Expand Down
5 changes: 3 additions & 2 deletions compress_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !js
// +build !js

package websocket
Expand All @@ -6,8 +7,8 @@ import (
"strings"
"testing"

"nhooyr.io/websocket/internal/test/assert"
"nhooyr.io/websocket/internal/test/xrand"
"github.com/cisco-pxgrid/websocket/internal/test/assert"
"github.com/cisco-pxgrid/websocket/internal/test/xrand"
)

func Test_slidingWindow(t *testing.T) {
Expand Down
17 changes: 9 additions & 8 deletions conn_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !js
// +build !js

package websocket_test
Expand All @@ -20,14 +21,14 @@ import (
"github.com/golang/protobuf/ptypes"
"github.com/golang/protobuf/ptypes/duration"

"nhooyr.io/websocket"
"nhooyr.io/websocket/internal/errd"
"nhooyr.io/websocket/internal/test/assert"
"nhooyr.io/websocket/internal/test/wstest"
"nhooyr.io/websocket/internal/test/xrand"
"nhooyr.io/websocket/internal/xsync"
"nhooyr.io/websocket/wsjson"
"nhooyr.io/websocket/wspb"
"github.com/cisco-pxgrid/websocket"
"github.com/cisco-pxgrid/websocket/internal/errd"
"github.com/cisco-pxgrid/websocket/internal/test/assert"
"github.com/cisco-pxgrid/websocket/internal/test/wstest"
"github.com/cisco-pxgrid/websocket/internal/test/xrand"
"github.com/cisco-pxgrid/websocket/internal/xsync"
"github.com/cisco-pxgrid/websocket/wsjson"
"github.com/cisco-pxgrid/websocket/wspb"
)

func TestConn(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion dial.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !js
// +build !js

package websocket
Expand All @@ -17,7 +18,7 @@ import (
"sync"
"time"

"nhooyr.io/websocket/internal/errd"
"github.com/cisco-pxgrid/websocket/internal/errd"
)

// DialOptions represents Dial's options.
Expand Down
3 changes: 2 additions & 1 deletion dial_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !js
// +build !js

package websocket
Expand All @@ -13,7 +14,7 @@ import (
"testing"
"time"

"nhooyr.io/websocket/internal/test/assert"
"github.com/cisco-pxgrid/websocket/internal/test/assert"
)

func TestBadDials(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"net/http"
"time"

"nhooyr.io/websocket"
"nhooyr.io/websocket/wsjson"
"github.com/cisco-pxgrid/websocket"
"github.com/cisco-pxgrid/websocket/wsjson"
)

func ExampleAccept() {
Expand Down
2 changes: 1 addition & 1 deletion examples/chat/chat.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

"golang.org/x/time/rate"

"nhooyr.io/websocket"
"github.com/cisco-pxgrid/websocket"
)

// chatServer enables broadcasting to a set of subscribers.
Expand Down
2 changes: 1 addition & 1 deletion examples/chat/chat_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

"golang.org/x/time/rate"

"nhooyr.io/websocket"
"github.com/cisco-pxgrid/websocket"
)

func Test_chatServer(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion examples/echo/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"golang.org/x/time/rate"

"nhooyr.io/websocket"
"github.com/cisco-pxgrid/websocket"
)

// echoServer is the WebSocket echo server implementation.
Expand Down
4 changes: 2 additions & 2 deletions examples/echo/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"testing"
"time"

"nhooyr.io/websocket"
"nhooyr.io/websocket/wsjson"
"github.com/cisco-pxgrid/websocket"
"github.com/cisco-pxgrid/websocket/wsjson"
)

// Test_echoServer tests the echoServer by sending it 5 different messages
Expand Down
2 changes: 1 addition & 1 deletion frame.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"math"
"math/bits"

"nhooyr.io/websocket/internal/errd"
"github.com/cisco-pxgrid/websocket/internal/errd"
)

// opcode represents a WebSocket opcode.
Expand Down
3 changes: 2 additions & 1 deletion frame_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !js
// +build !js

package websocket
Expand All @@ -16,7 +17,7 @@ import (
"github.com/gobwas/ws"
_ "github.com/gorilla/websocket"

"nhooyr.io/websocket/internal/test/assert"
"github.com/cisco-pxgrid/websocket/internal/test/assert"
)

func TestHeader(t *testing.T) {
Expand Down
30 changes: 26 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,15 +1,37 @@
module nhooyr.io/websocket
module github.com/cisco-pxgrid/websocket

go 1.13
go 1.19

require (
github.com/gin-gonic/gin v1.8.2
github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee // indirect
github.com/gobwas/pool v0.2.0 // indirect
github.com/gobwas/ws v1.0.2
github.com/golang/protobuf v1.5.0
github.com/google/go-cmp v0.5.5
github.com/gorilla/websocket v1.4.1
github.com/klauspost/compress v1.10.3
golang.org/x/time v0.0.0-20191024005414-555d28b269f0
)

require (
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-playground/locales v0.14.0 // indirect
github.com/go-playground/universal-translator v0.18.0 // indirect
github.com/go-playground/validator/v10 v10.11.1 // indirect
github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee // indirect
github.com/gobwas/pool v0.2.0 // indirect
github.com/goccy/go-json v0.9.11 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
github.com/ugorji/go/codec v1.2.7 // indirect
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3 // indirect
golang.org/x/net v0.4.0 // indirect
golang.org/x/sys v0.3.0 // indirect
golang.org/x/text v0.5.0 // indirect
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)
20 changes: 0 additions & 20 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -67,49 +67,29 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/ugorji/go v1.2.7 h1:qYhyWUUd6WbiM+C6JZAUkIJt/1WrjzNHY9+KCIjVqTo=
github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M=
github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0=
github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3 h1:0es+/5331RGQPcXlMfP+WrnIIS6dNnNRe0WB02W0F4M=
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU=
golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
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-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ=
golang.org/x/sys v0.3.0/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/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM=
golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
Expand Down
8 changes: 4 additions & 4 deletions internal/test/wstest/echo.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"io"
"time"

"nhooyr.io/websocket"
"nhooyr.io/websocket/internal/test/assert"
"nhooyr.io/websocket/internal/test/xrand"
"nhooyr.io/websocket/internal/xsync"
"github.com/cisco-pxgrid/websocket"
"github.com/cisco-pxgrid/websocket/internal/test/assert"
"github.com/cisco-pxgrid/websocket/internal/test/xrand"
"github.com/cisco-pxgrid/websocket/internal/xsync"
)

// EchoLoop echos every msg received from c until an error
Expand Down
3 changes: 2 additions & 1 deletion internal/test/wstest/pipe.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !js
// +build !js

package wstest
Expand All @@ -9,7 +10,7 @@ import (
"net/http"
"net/http/httptest"

"nhooyr.io/websocket"
"github.com/cisco-pxgrid/websocket"
)

// Pipe is used to create an in memory connection
Expand Down
2 changes: 1 addition & 1 deletion internal/xsync/go_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package xsync
import (
"testing"

"nhooyr.io/websocket/internal/test/assert"
"github.com/cisco-pxgrid/websocket/internal/test/assert"
)

func TestGoRecover(t *testing.T) {
Expand Down
5 changes: 3 additions & 2 deletions read.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !js
// +build !js

package websocket
Expand All @@ -12,8 +13,8 @@ import (
"strings"
"time"

"nhooyr.io/websocket/internal/errd"
"nhooyr.io/websocket/internal/xsync"
"github.com/cisco-pxgrid/websocket/internal/errd"
"github.com/cisco-pxgrid/websocket/internal/xsync"
)

// Reader reads from the connection until there is a WebSocket
Expand Down
5 changes: 0 additions & 5 deletions vendor/github.com/gin-contrib/sse/go.mod

This file was deleted.

7 changes: 0 additions & 7 deletions vendor/github.com/gin-contrib/sse/go.sum

This file was deleted.

Loading

0 comments on commit 883dd8f

Please sign in to comment.