diff -Nru golang-github-gorilla-websocket-1.4.1/client_server_test.go golang-github-gorilla-websocket-1.4.2/client_server_test.go --- golang-github-gorilla-websocket-1.4.1/client_server_test.go 2019-08-25 01:20:11.000000000 +0000 +++ golang-github-gorilla-websocket-1.4.2/client_server_test.go 2020-03-19 17:50:51.000000000 +0000 @@ -587,7 +587,7 @@ server *httptest.Server // server to use url string // host for request URI header string // optional request host header - tls string // optiona host for tls ServerName + tls string // optional host for tls ServerName wantAddr string // expected host for dial wantHeader string // expected request header on server insecureSkipVerify bool diff -Nru golang-github-gorilla-websocket-1.4.1/conn.go golang-github-gorilla-websocket-1.4.2/conn.go --- golang-github-gorilla-websocket-1.4.1/conn.go 2019-08-25 01:20:11.000000000 +0000 +++ golang-github-gorilla-websocket-1.4.2/conn.go 2020-03-19 17:50:51.000000000 +0000 @@ -244,8 +244,8 @@ subprotocol string // Write fields - mu chan bool // used as mutex to protect write to conn - writeBuf []byte // frame is constructed in this buffer. + mu chan struct{} // used as mutex to protect write to conn + writeBuf []byte // frame is constructed in this buffer. writePool BufferPool writeBufSize int writeDeadline time.Time @@ -302,8 +302,8 @@ writeBuf = make([]byte, writeBufferSize) } - mu := make(chan bool, 1) - mu <- true + mu := make(chan struct{}, 1) + mu <- struct{}{} c := &Conn{ isServer: isServer, br: br, @@ -377,7 +377,7 @@ func (c *Conn) write(frameType int, deadline time.Time, buf0, buf1 []byte) error { <-c.mu - defer func() { c.mu <- true }() + defer func() { c.mu <- struct{}{} }() c.writeErrMu.Lock() err := c.writeErr @@ -429,7 +429,7 @@ maskBytes(key, 0, buf[6:]) } - d := time.Hour * 1000 + d := 1000 * time.Hour if !deadline.IsZero() { d = deadline.Sub(time.Now()) if d < 0 { @@ -444,7 +444,7 @@ case <-timer.C: return errWriteTimeout } - defer func() { c.mu <- true }() + defer func() { c.mu <- struct{}{} }() c.writeErrMu.Lock() err := c.writeErr diff -Nru golang-github-gorilla-websocket-1.4.1/debian/changelog golang-github-gorilla-websocket-1.4.2/debian/changelog --- golang-github-gorilla-websocket-1.4.1/debian/changelog 2019-11-14 10:40:24.000000000 +0000 +++ golang-github-gorilla-websocket-1.4.2/debian/changelog 2020-09-18 23:49:48.000000000 +0000 @@ -1,3 +1,18 @@ +golang-github-gorilla-websocket (1.4.2-1) unstable; urgency=medium + + [ Debian Janitor ] + * Apply multi-arch hints + + golang-github-gorilla-websocket-dev: Add Multi-Arch: foreign. + (Closes: #961633) + Changes-By: lintian-brush + + [ Anthony Fok ] + * New upstream version 1.4.2 + * Bump Standards-Version to 4.5.0 (no change) + * Bump debhelper dependency to "Build-Depends: debhelper-compat (= 13)" + + -- Anthony Fok Fri, 18 Sep 2020 17:49:48 -0600 + golang-github-gorilla-websocket (1.4.1-2) unstable; urgency=medium * Source-only upload, after the initial binary upload due to diff -Nru golang-github-gorilla-websocket-1.4.1/debian/control golang-github-gorilla-websocket-1.4.2/debian/control --- golang-github-gorilla-websocket-1.4.1/debian/control 2019-11-14 10:40:13.000000000 +0000 +++ golang-github-gorilla-websocket-1.4.2/debian/control 2020-09-18 23:49:30.000000000 +0000 @@ -5,10 +5,10 @@ Section: devel Testsuite: autopkgtest-pkg-go Priority: optional -Build-Depends: debhelper-compat (= 12), +Build-Depends: debhelper-compat (= 13), dh-golang, golang-any -Standards-Version: 4.4.1 +Standards-Version: 4.5.0 Vcs-Browser: https://salsa.debian.org/go-team/packages/golang-github-gorilla-websocket Vcs-Git: https://salsa.debian.org/go-team/packages/golang-github-gorilla-websocket.git Homepage: https://github.com/gorilla/websocket @@ -21,6 +21,7 @@ Breaks: golang-websocket-dev (<< 1.0.0+git20160606.12.a687089-1~) Provides: golang-websocket-dev Replaces: golang-websocket-dev (<< 1.0.0+git20160606.12.a687089-1~) +Multi-Arch: foreign Description: Go package implementing the WebSocket protocol The Gorilla WebSocket package provides a complete and tested implementation of the WebSocket protocol, as defined by RFC 6455. It diff -Nru golang-github-gorilla-websocket-1.4.1/debian/gbp.conf golang-github-gorilla-websocket-1.4.2/debian/gbp.conf --- golang-github-gorilla-websocket-1.4.1/debian/gbp.conf 2019-11-14 10:32:03.000000000 +0000 +++ golang-github-gorilla-websocket-1.4.2/debian/gbp.conf 2020-09-18 23:48:04.000000000 +0000 @@ -1,3 +1,4 @@ [DEFAULT] debian-branch = debian/sid +dist = DEP14 pristine-tar = True diff -Nru golang-github-gorilla-websocket-1.4.1/doc.go golang-github-gorilla-websocket-1.4.2/doc.go --- golang-github-gorilla-websocket-1.4.1/doc.go 2019-08-25 01:20:11.000000000 +0000 +++ golang-github-gorilla-websocket-1.4.2/doc.go 2020-03-19 17:50:51.000000000 +0000 @@ -187,9 +187,9 @@ // than the largest message do not provide any benefit. // // Depending on the distribution of message sizes, setting the buffer size to -// to a value less than the maximum expected message size can greatly reduce -// memory use with a small impact on performance. Here's an example: If 99% of -// the messages are smaller than 256 bytes and the maximum message size is 512 +// a value less than the maximum expected message size can greatly reduce memory +// use with a small impact on performance. Here's an example: If 99% of the +// messages are smaller than 256 bytes and the maximum message size is 512 // bytes, then a buffer size of 256 bytes will result in 1.01 more system calls // than a buffer size of 512 bytes. The memory savings is 50%. // diff -Nru golang-github-gorilla-websocket-1.4.1/examples/chat/home.html golang-github-gorilla-websocket-1.4.2/examples/chat/home.html --- golang-github-gorilla-websocket-1.4.1/examples/chat/home.html 2019-08-25 01:20:11.000000000 +0000 +++ golang-github-gorilla-websocket-1.4.2/examples/chat/home.html 2020-03-19 17:50:51.000000000 +0000 @@ -92,7 +92,7 @@
- +
diff -Nru golang-github-gorilla-websocket-1.4.1/examples/echo/server.go golang-github-gorilla-websocket-1.4.2/examples/echo/server.go --- golang-github-gorilla-websocket-1.4.1/examples/echo/server.go 2019-08-25 01:20:11.000000000 +0000 +++ golang-github-gorilla-websocket-1.4.2/examples/echo/server.go 2020-03-19 17:50:51.000000000 +0000 @@ -67,7 +67,7 @@ var print = function(message) { var d = document.createElement("div"); - d.innerHTML = message; + d.textContent = message; output.appendChild(d); }; diff -Nru golang-github-gorilla-websocket-1.4.1/example_test.go golang-github-gorilla-websocket-1.4.2/example_test.go --- golang-github-gorilla-websocket-1.4.1/example_test.go 2019-08-25 01:20:11.000000000 +0000 +++ golang-github-gorilla-websocket-1.4.2/example_test.go 2020-03-19 17:50:51.000000000 +0000 @@ -23,10 +23,9 @@ // This server application works with a client application running in the // browser. The client application does not explicitly close the websocket. The // only expected close message from the client has the code -// websocket.CloseGoingAway. All other other close messages are likely the +// websocket.CloseGoingAway. All other close messages are likely the // result of an application or protocol error and are logged to aid debugging. func ExampleIsUnexpectedCloseError() { - for { messageType, p, err := c.ReadMessage() if err != nil { @@ -35,11 +34,11 @@ } return } - processMesage(messageType, p) + processMessage(messageType, p) } } -func processMesage(mt int, p []byte) {} +func processMessage(mt int, p []byte) {} // TestX prevents godoc from showing this entire file in the example. Remove // this function when a second example is added. diff -Nru golang-github-gorilla-websocket-1.4.1/go.sum golang-github-gorilla-websocket-1.4.2/go.sum --- golang-github-gorilla-websocket-1.4.1/go.sum 2019-08-25 01:20:11.000000000 +0000 +++ golang-github-gorilla-websocket-1.4.2/go.sum 2020-03-19 17:50:51.000000000 +0000 @@ -1,2 +0,0 @@ -github.com/gorilla/websocket v1.4.0 h1:WDFjx/TMzVgy9VdMMQi2K2Emtwi2QcUQsztZ/zLaH/Q= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= diff -Nru golang-github-gorilla-websocket-1.4.1/prepared.go golang-github-gorilla-websocket-1.4.2/prepared.go --- golang-github-gorilla-websocket-1.4.1/prepared.go 2019-08-25 01:20:11.000000000 +0000 +++ golang-github-gorilla-websocket-1.4.2/prepared.go 2020-03-19 17:50:51.000000000 +0000 @@ -73,8 +73,8 @@ // Prepare a frame using a 'fake' connection. // TODO: Refactor code in conn.go to allow more direct construction of // the frame. - mu := make(chan bool, 1) - mu <- true + mu := make(chan struct{}, 1) + mu <- struct{}{} var nc prepareConn c := &Conn{ conn: &nc, diff -Nru golang-github-gorilla-websocket-1.4.1/README.md golang-github-gorilla-websocket-1.4.2/README.md --- golang-github-gorilla-websocket-1.4.1/README.md 2019-08-25 01:20:11.000000000 +0000 +++ golang-github-gorilla-websocket-1.4.2/README.md 2020-03-19 17:50:51.000000000 +0000 @@ -8,7 +8,7 @@ ### Documentation -* [API Reference](http://godoc.org/github.com/gorilla/websocket) +* [API Reference](https://pkg.go.dev/github.com/gorilla/websocket?tab=doc) * [Chat example](https://github.com/gorilla/websocket/tree/master/examples/chat) * [Command example](https://github.com/gorilla/websocket/tree/master/examples/command) * [Client and server example](https://github.com/gorilla/websocket/tree/master/examples/echo)