From 50b70eeb6830040db73c8b2b389d881a3200de8d Mon Sep 17 00:00:00 2001 From: Jonathan Rudenberg Date: Thu, 20 Jun 2013 23:19:44 -0400 Subject: [PATCH] Remove code unreachable using Go 1.1 --- container.go | 3 --- contrib/crashTest.go | 1 - network.go | 1 - utils/utils.go | 3 --- 4 files changed, 8 deletions(-) diff --git a/container.go b/container.go index f60de21bdc..cc360243f7 100644 --- a/container.go +++ b/container.go @@ -632,7 +632,6 @@ func (container *Container) waitLxc() error { } time.Sleep(500 * time.Millisecond) } - panic("Unreachable") } func (container *Container) monitor() { @@ -821,8 +820,6 @@ func (container *Container) WaitTimeout(timeout time.Duration) error { case <-done: return nil } - - panic("Unreachable") } func (container *Container) EnsureMounted() error { diff --git a/contrib/crashTest.go b/contrib/crashTest.go index b3dbacaf03..d3ba80698c 100644 --- a/contrib/crashTest.go +++ b/contrib/crashTest.go @@ -116,7 +116,6 @@ func crashTest() error { return err } } - return nil } func main() { diff --git a/network.go b/network.go index ea5e5c8586..37037dd14a 100644 --- a/network.go +++ b/network.go @@ -257,7 +257,6 @@ func proxy(listener net.Listener, proto, address string) error { utils.Debugf("Connected to backend, splicing") splice(src, dst) } - panic("Unreachable") } func halfSplice(dst, src net.Conn) error { diff --git a/utils/utils.go b/utils/utils.go index 3cd2f4e7ff..6ab8a64bc0 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -236,7 +236,6 @@ func (r *bufReader) Read(p []byte) (n int, err error) { } r.wait.Wait() } - panic("unreachable") } func (r *bufReader) Close() error { @@ -678,5 +677,3 @@ func ParseHost(host string, port int, addr string) string { } return fmt.Sprintf("tcp://%s:%d", host, port) } - -