Skip to content

Commit

Permalink
update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
kataras committed Apr 8, 2024
1 parent 1db32f4 commit 99c879b
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 36 deletions.
5 changes: 1 addition & 4 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ Revision ID: f63a528211ca90f8854600f44f92aac8fbcb34e0
----------------- ----------------- ------------------------------------------
go e369490fb7db5f2 https://github.com/golang/go
d42bb0e8ee19b48
378dee0ebf
go.uuid 36e9d2ebbde5e3f https://github.com/iris-contrib/go.uuid
13ab2e25625fd45
3271d6522e
378dee0ebf
websocket 80c2d40e9b91f2e https://github.com/gorilla/websocket
f7a9c1a403aeec6
4d1b89a9a6
Expand Down
15 changes: 7 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,21 @@ go 1.21

require (
github.com/gobwas/ws v1.3.2
github.com/google/uuid v1.6.0
github.com/gorilla/websocket v1.5.1
github.com/iris-contrib/go.uuid v2.0.0+incompatible
github.com/mediocregopher/radix/v3 v3.8.1
github.com/nats-io/nats.go v1.31.0
golang.org/x/sync v0.6.0
github.com/nats-io/nats.go v1.34.1
golang.org/x/sync v0.7.0
)

require (
github.com/gobwas/httphead v0.1.0 // indirect
github.com/gobwas/pool v0.2.1 // indirect
github.com/klauspost/compress v1.17.0 // indirect
github.com/klauspost/compress v1.17.2 // indirect
github.com/nats-io/nkeys v0.4.7 // indirect
github.com/nats-io/nuid v1.0.1 // indirect
golang.org/x/crypto v0.18.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/crypto v0.22.0 // indirect
golang.org/x/net v0.24.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
)
35 changes: 14 additions & 21 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"sync/atomic"
"time"

uuid "github.com/iris-contrib/go.uuid"
"github.com/google/uuid"
)

// Upgrader is the definition type of a protocol upgrader, gorilla or gobwas or custom.
Expand All @@ -27,7 +27,7 @@ type IDGenerator func(w http.ResponseWriter, r *http.Request) string
// DefaultIDGenerator returns a universal unique identifier for a new connection.
// It's the default `IDGenerator` for `Server`.
var DefaultIDGenerator IDGenerator = func(http.ResponseWriter, *http.Request) string {
id, err := uuid.NewV4()
id, err := uuid.NewRandom()
if err != nil {
return strconv.FormatInt(time.Now().Unix(), 10)
}
Expand Down Expand Up @@ -114,7 +114,7 @@ func New(upgrader Upgrader, connHandler ConnHandler) *Server {
readTimeout, writeTimeout := getTimeouts(connHandler)
namespaces := connHandler.GetNamespaces()
s := &Server{
uuid: uuid.Must(uuid.NewV4()).String(),
uuid: uuid.NewString(),
upgrader: upgrader,
namespaces: namespaces,
readTimeout: readTimeout,
Expand Down

0 comments on commit 99c879b

Please sign in to comment.