pruepei / influx-proxy

Other
6 stars 4 forks source link

dead code summary #15

Open Sn0rt opened 7 years ago

Sn0rt commented 7 years ago
func (hs *HttpService) HandlerPing(w http.ResponseWriter, req *http.Request) {
    defer req.Body.Close()
    version, err := hs.ic.Ping()
    if err != nil {
        panic("WTF")
        return // this line is unreachable code !
    }
...
}
Sn0rt commented 7 years ago
$ grep -rin panic . -A 2
./backend/cluster.go:122:               panic(err)
./backend/cluster.go-123-               return
./backend/cluster.go-124-       }
--
./backend/cluster.go:127:               panic(err)
./backend/cluster.go-128-               return
./backend/cluster.go-129-       }
Binary file ./bin/influx-proxy matches
--
./service/http.go:62:           panic("WTF")
./service/http.go-63-           return
./service/http.go-64-   }

同理