Skip to content

Commit 6b782a3

Browse files
committed
Run make fmt
1 parent 6c6b8e9 commit 6b782a3

File tree

18 files changed

+127
-16
lines changed

18 files changed

+127
-16
lines changed

autobahn_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ import (
88
"net"
99
"net/http"
1010
"net/http/httptest"
11-
"nhooyr.io/websocket"
1211
"os"
1312
"os/exec"
1413
"strconv"
1514
"strings"
1615
"testing"
1716
"time"
17+
18+
"nhooyr.io/websocket"
1819
)
1920

2021
func TestAutobahn(t *testing.T) {

ci/fmt.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ prettier:
2222
prettier --write --print-width=120 --no-semi --trailing-comma=all --loglevel=warn $$(git ls-files "*.yml" "*.md")
2323

2424
gen:
25-
stringer -type=Opcode,MessageType,StatusCode -output=websocket_stringer.go
25+
stringer -type=opcode,MessageType,StatusCode -output=websocket_stringer.go

close.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ import (
66
"errors"
77
"fmt"
88
"log"
9-
"nhooyr.io/websocket/internal/bpool"
109
"time"
10+
11+
"nhooyr.io/websocket/internal/bpool"
1112
)
1213

1314
// StatusCode represents a WebSocket status code.

close_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
package websocket
22

33
import (
4-
"github.com/google/go-cmp/cmp"
54
"io"
65
"math"
7-
"nhooyr.io/websocket/internal/assert"
86
"strings"
97
"testing"
8+
9+
"github.com/google/go-cmp/cmp"
10+
11+
"nhooyr.io/websocket/internal/assert"
1012
)
1113

1214
func TestCloseError(t *testing.T) {

conn.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ func (c *Conn) ping(ctx context.Context, p string) error {
194194

195195
type mu struct {
196196
once sync.Once
197-
ch chan struct{}
197+
ch chan struct{}
198198
}
199199

200200
func (m *mu) init() {

conn_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ import (
88
"io"
99
"net/http"
1010
"net/http/httptest"
11-
"nhooyr.io/websocket/internal/assert"
1211
"strings"
1312
"sync/atomic"
1413
"testing"
1514
"time"
1615

1716
"nhooyr.io/websocket"
17+
"nhooyr.io/websocket/internal/assert"
1818
)
1919

2020
func TestConn(t *testing.T) {
@@ -51,7 +51,6 @@ func TestConn(t *testing.T) {
5151
})
5252
}
5353

54-
5554
func testServer(tb testing.TB, fn func(w http.ResponseWriter, r *http.Request), tls bool) (s *httptest.Server, closeFn func()) {
5655
h := http.HandlerFunc(fn)
5756
if tls {

frame.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import (
55
"encoding/binary"
66
"math"
77
"math/bits"
8+
9+
"nhooyr.io/websocket/internal/errd"
810
)
911

1012
// opcode represents a WebSocket opcode.

frame_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,16 @@ import (
77
"bytes"
88
"encoding/binary"
99
"math/bits"
10-
"nhooyr.io/websocket/internal/assert"
10+
"math/rand"
1111
"strconv"
1212
"testing"
1313
"time"
1414
_ "unsafe"
1515

1616
"github.com/gobwas/ws"
1717
_ "github.com/gorilla/websocket"
18-
"math/rand"
18+
19+
"nhooyr.io/websocket/internal/assert"
1920
)
2021

2122
func init() {

internal/assert/cmp.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
package assert
22

33
import (
4-
"github.com/google/go-cmp/cmp"
54
"reflect"
5+
6+
"github.com/google/go-cmp/cmp"
67
)
78

89
// https://github.com/google/go-cmp/issues/40#issuecomment-328615283

internal/errd/wrap.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ import (
99
// Inspired by https://github.com/golang/go/issues/32676.
1010
func Wrap(err *error, f string, v ...interface{}) {
1111
if *err != nil {
12-
*err = fmt.Errorf(f+ ": %w", append(v, *err)...)
12+
*err = fmt.Errorf(f+": %w", append(v, *err)...)
1313
}
1414
}

0 commit comments

Comments
 (0)