Skip to content

Commit a2013e1

Browse files
committed
test: add client configuration tests
1 parent e0674a5 commit a2013e1

2 files changed

Lines changed: 581 additions & 17 deletions

File tree

client_config.go

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,6 @@ type WebSocketConfig struct {
2020
RequestHeader http.Header
2121
}
2222

23-
func (w *WebSocketConfig) Clone() *WebSocketConfig {
24-
if w == nil {
25-
return nil
26-
}
27-
subprotocols := make([]string, 0, len(w.Subprotocols))
28-
29-
subprotocols = append(subprotocols, w.Subprotocols...)
30-
cfg := WebSocketConfig{
31-
ReadBufferSize: w.ReadBufferSize,
32-
Subprotocols: subprotocols,
33-
EnableCompression: w.EnableCompression,
34-
Jar: w.Jar,
35-
RequestHeader: w.RequestHeader.Clone(),
36-
}
37-
return &cfg
38-
}
39-
4023
func (w *WebSocketConfig) jar() http.CookieJar {
4124
if w == nil {
4225
return websocket.DefaultDialer.Jar

0 commit comments

Comments
 (0)