Skip to content
This repository was archived by the owner on Jul 1, 2021. It is now read-only.

Commit 97d335d

Browse files
committed
Format
1 parent cd1809d commit 97d335d

9 files changed

+24
-15
lines changed

access_validator.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ package ws
22

33
import (
44
"bytes"
5-
"github.com/spiral/roadrunner/service/http/attributes"
65
"io"
76
"net/http"
87
"strings"
8+
9+
"github.com/spiral/roadrunner/service/http/attributes"
910
)
1011

1112
type accessValidator struct {

access_validator_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
package ws
22

33
import (
4-
"github.com/stretchr/testify/assert"
54
"testing"
5+
6+
"github.com/stretchr/testify/assert"
67
)
78

89
func TestResponseWrapper_Body(t *testing.T) {

cmd/rr-ws/ws/debug.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
package ws
22

33
import (
4+
"strings"
5+
46
"github.com/gorilla/websocket"
57
"github.com/sirupsen/logrus"
68
"github.com/spf13/cobra"
79
ws "github.com/spiral/broadcast-ws"
810
rr "github.com/spiral/roadrunner/cmd/rr/cmd"
911
"github.com/spiral/roadrunner/cmd/util"
10-
"strings"
1112
)
1213

1314
func init() {

config_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ package ws
22

33
import (
44
"encoding/json"
5+
"testing"
6+
57
"github.com/spiral/roadrunner/service"
68
"github.com/stretchr/testify/assert"
7-
"testing"
89
)
910

1011
type mockCfg struct{ cfg string }

conn_context.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package ws
22

33
import (
44
"encoding/json"
5+
56
"github.com/gorilla/websocket"
67
"github.com/spiral/broadcast"
78
)

conn_context_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
package ws
22

33
import (
4-
"github.com/stretchr/testify/assert"
54
"testing"
5+
6+
"github.com/stretchr/testify/assert"
67
)
78

89
func TestConnContext_ManageTopics(t *testing.T) {

conn_pool.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ package ws
22

33
import (
44
"errors"
5+
"sync"
6+
57
"github.com/gorilla/websocket"
68
"github.com/spiral/broadcast"
7-
"sync"
89
)
910

1011
// manages a set of websocket connections

service.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@ package ws
22

33
import (
44
"encoding/json"
5+
"net/http"
6+
"sync"
7+
"sync/atomic"
8+
59
"github.com/gorilla/websocket"
610
"github.com/spiral/broadcast"
711
"github.com/spiral/roadrunner/service/env"
812
rhttp "github.com/spiral/roadrunner/service/http"
913
"github.com/spiral/roadrunner/service/rpc"
10-
"net/http"
11-
"sync"
12-
"sync/atomic"
1314
)
1415

1516
// ID defines service id.

service_test.go

+7-6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@ package ws
22

33
import (
44
"encoding/json"
5+
"io/ioutil"
6+
"net/http"
7+
"net/url"
8+
"strings"
9+
"testing"
10+
"time"
11+
512
"github.com/gorilla/websocket"
613
"github.com/sirupsen/logrus"
714
"github.com/sirupsen/logrus/hooks/test"
@@ -11,12 +18,6 @@ import (
1118
rrhttp "github.com/spiral/roadrunner/service/http"
1219
"github.com/spiral/roadrunner/service/rpc"
1320
"github.com/stretchr/testify/assert"
14-
"io/ioutil"
15-
"net/http"
16-
"net/url"
17-
"strings"
18-
"testing"
19-
"time"
2021
)
2122

2223
type testCfg struct {

0 commit comments

Comments
 (0)