Skip to content

Commit

Permalink
Remove code unreachable using Go 1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
titanous committed Jun 21, 2013
1 parent 09dd7f1 commit 50b70ee
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 8 deletions.
3 changes: 0 additions & 3 deletions container.go
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,6 @@ func (container *Container) waitLxc() error {
}
time.Sleep(500 * time.Millisecond)
}
panic("Unreachable")
}

func (container *Container) monitor() {
Expand Down Expand Up @@ -821,8 +820,6 @@ func (container *Container) WaitTimeout(timeout time.Duration) error {
case <-done:
return nil
}

panic("Unreachable")
}

func (container *Container) EnsureMounted() error {
Expand Down
1 change: 0 additions & 1 deletion contrib/crashTest.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ func crashTest() error {
return err
}
}
return nil
}

func main() {
Expand Down
1 change: 0 additions & 1 deletion network.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 0 additions & 3 deletions utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ func (r *bufReader) Read(p []byte) (n int, err error) {
}
r.wait.Wait()
}
panic("unreachable")
}

func (r *bufReader) Close() error {
Expand Down Expand Up @@ -678,5 +677,3 @@ func ParseHost(host string, port int, addr string) string {
}
return fmt.Sprintf("tcp://%s:%d", host, port)
}


0 comments on commit 50b70ee

Please sign in to comment.