From 210139db95f4cf56680e88f15fe9052d9c8c8a6b Mon Sep 17 00:00:00 2001 From: Soheil Hassas Yeganeh Date: Mon, 13 Mar 2017 09:42:01 -0400 Subject: [PATCH 1/2] Change connection closed string in tests. Go 1.8 and 1.9 use different text for the connection closed error. Use their common prefix (i.e., "use of closed") in the tests for them to pass on all Go versions. Go 1.8: "use of closed network connection" Go 1.9: "use of closed file or network connection" Suggested-by: Damien Neil --- cmux_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmux_test.go b/cmux_test.go index 17945c8..5331519 100644 --- a/cmux_test.go +++ b/cmux_test.go @@ -42,7 +42,7 @@ const ( ) func safeServe(errCh chan<- error, muxl CMux) { - if err := muxl.Serve(); !strings.Contains(err.Error(), "use of closed network connection") { + if err := muxl.Serve(); !strings.Contains(err.Error(), "use of closed") { errCh <- err } } From 79b9df6ccfd6138596ace9f1fe711cf32bac8bd9 Mon Sep 17 00:00:00 2001 From: Soheil Hassas Yeganeh Date: Mon, 13 Mar 2017 09:45:05 -0400 Subject: [PATCH 2/2] Add Go 1.8 to the travis config. --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index da824cb..d43e278 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,7 @@ go: - 1.5 - 1.6 - 1.7 + - 1.8 - tip matrix: