Skip to content

Commit

Permalink
fix: replace nhooyr.io/websocket gith github.com/coder/websocket (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
pajlada authored Aug 12, 2024
1 parent 03b6111 commit 5400f5c
Show file tree
Hide file tree
Showing 17 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion cmd/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/Chatterino/twitch-pubsub-server-test/internal/routes/liveupdates"
"github.com/Chatterino/twitch-pubsub-server-test/internal/routes/liveupdates/bttv"
"github.com/Chatterino/twitch-pubsub-server-test/internal/routes/liveupdates/seventv"
"nhooyr.io/websocket"
"github.com/coder/websocket"
)

type server struct {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ go 1.20

require (
git.kotmisia.pl/Mm2PL/examples v1.0.0
github.com/coder/websocket v1.8.12
honnef.co/go/tools v0.4.7
nhooyr.io/websocket v1.8.11
)

require (
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ git.kotmisia.pl/Mm2PL/examples v1.0.0 h1:O/FUxiR7shJWTWhHBkEHFYvO/3CJfh9L6c90t6s
git.kotmisia.pl/Mm2PL/examples v1.0.0/go.mod h1:eyZjuAOMmFaZfyD3d+L5ghIGDVu505bpSvm1xVoapn8=
github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak=
github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/coder/websocket v1.8.12 h1:5bUXkEPPIbewrnkU8LTCLVaxi4N4J8ahufH2vlo4NAo=
github.com/coder/websocket v1.8.12/go.mod h1:LNVeNrXQZfe5qhS9ALED3uA+l5pPqvwXg3CKoDBB2gs=
golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9 h1:6WHiuFL9FNjg8RljAaT7FNUuKDbvMqS1i5cr2OE2sLQ=
golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk=
golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc=
Expand All @@ -13,5 +15,3 @@ golang.org/x/tools v0.12.1-0.20230825192346-2191a27a6dc5 h1:Vk4mysSz+GqQK2eqgWbo
golang.org/x/tools v0.12.1-0.20230825192346-2191a27a6dc5/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM=
honnef.co/go/tools v0.4.7 h1:9MDAWxMoSnB6QoSqiVr7P5mtkT9pOc1kSxchzPCnqJs=
honnef.co/go/tools v0.4.7/go.mod h1:+rnGS1THNh8zMwnd2oVOTL9QF6vmfyG6ZXBULae2uc0=
nhooyr.io/websocket v1.8.11 h1:f/qXNc2/3DpoSZkHt1DQu6rj4zGC8JmkkLkWss0MgN0=
nhooyr.io/websocket v1.8.11/go.mod h1:rN9OFWIUwuxg4fR5tELlYC04bXYowCP9GX47ivo2l+c=
2 changes: 1 addition & 1 deletion internal/routes/authentication_required.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"log"
"net/http"

"nhooyr.io/websocket"
"github.com/coder/websocket"
)

func authenticatedHandler(ctx context.Context, c *websocket.Conn, r *http.Request) bool {
Expand Down
2 changes: 1 addition & 1 deletion internal/routes/automod_held.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net/http"
"time"

"nhooyr.io/websocket"
"github.com/coder/websocket"
)

/*
Expand Down
2 changes: 1 addition & 1 deletion internal/routes/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"log"
"net/http"

"nhooyr.io/websocket"
"github.com/coder/websocket"
)

func handleListen(ctx context.Context, c *websocket.Conn, r *http.Request, msg Message) {
Expand Down
2 changes: 1 addition & 1 deletion internal/routes/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package routes
import (
"net/http"

"nhooyr.io/websocket"
"github.com/coder/websocket"
)

func Default(c *websocket.Conn, r *http.Request) {
Expand Down
2 changes: 1 addition & 1 deletion internal/routes/dontrespondtoping.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"log"
"net/http"

"nhooyr.io/websocket"
"github.com/coder/websocket"
)

func DontRespondToPing(c *websocket.Conn, r *http.Request) {
Expand Down
2 changes: 1 addition & 1 deletion internal/routes/liveupdates/basic-sub-unsub.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"net/http"
"time"

"nhooyr.io/websocket"
"github.com/coder/websocket"
)

func BasicSubUnsub(c *websocket.Conn, r *http.Request) {
Expand Down
2 changes: 1 addition & 1 deletion internal/routes/liveupdates/bttv/basic.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"net/http"
"time"

"nhooyr.io/websocket"
"github.com/coder/websocket"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion internal/routes/liveupdates/bttv/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"log"
"net/http"

"nhooyr.io/websocket"
"github.com/coder/websocket"
)

func ConvertMessage[D MessageType](c *Message[json.RawMessage]) (Message[D], error) {
Expand Down
2 changes: 1 addition & 1 deletion internal/routes/liveupdates/seventv/basic.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"net/http"
"time"

"nhooyr.io/websocket"
"github.com/coder/websocket"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion internal/routes/liveupdates/seventv/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"log"
"net/http"

"nhooyr.io/websocket"
"github.com/coder/websocket"
)

func ConvertMessage[D MessageType](c *Message[json.RawMessage]) (Message[D], error) {
Expand Down
2 changes: 1 addition & 1 deletion internal/routes/liveupdates/seventv/heartbeat.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net/http"
"time"

"nhooyr.io/websocket"
"github.com/coder/websocket"
)

func NoHeartbeat(c *websocket.Conn, r *http.Request) {
Expand Down
2 changes: 1 addition & 1 deletion internal/routes/moderator_actions_user_banned.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"time"

"git.kotmisia.pl/Mm2PL/examples"
"nhooyr.io/websocket"
"github.com/coder/websocket"
)

func ModeratorActionsUserBanned(c *websocket.Conn, r *http.Request) {
Expand Down
2 changes: 1 addition & 1 deletion internal/routes/randomdisconnect.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net/http"
"time"

"nhooyr.io/websocket"
"github.com/coder/websocket"
)

func RandomDisconnect(c *websocket.Conn, r *http.Request) {
Expand Down
2 changes: 1 addition & 1 deletion internal/routes/receive_whisper.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net/http"
"time"

"nhooyr.io/websocket"
"github.com/coder/websocket"
)

func ReceiveWhisper(c *websocket.Conn, r *http.Request) {
Expand Down

0 comments on commit 5400f5c

Please sign in to comment.