mirror of
https://github.com/taigrr/log-socket
synced 2026-03-21 01:22:20 -07:00
test(ws,browser): add test suites for ws and browser packages (#22)
- Add ws/server_test.go: WebSocket connection, namespace filtering, non-upgrade rejection, SetUpgrader - Add ws/namespaces_test.go: NamespacesHandler response format and content - Add browser/browser_test.go: template rendering, ws URL construction, trailing slash handling - Fix goimports whitespace in ws/server.go
This commit is contained in:
@@ -23,7 +23,7 @@ func LogSocketHandler(w http.ResponseWriter, r *http.Request) {
|
||||
if namespacesParam != "" {
|
||||
namespaces = strings.Split(namespacesParam, ",")
|
||||
}
|
||||
|
||||
|
||||
c, err := upgrader.Upgrade(w, r, nil)
|
||||
if err != nil {
|
||||
logger.Error("upgrade:", err)
|
||||
|
||||
Reference in New Issue
Block a user