Indicate HTTP status code by library const (#703)

This commit is contained in:
xiekeyang
2018-05-24 19:10:45 +08:00
committed by Ta-Ching Chen
parent 8984e4916e
commit 940b9adabd
10 changed files with 49 additions and 49 deletions
+1 -1
View File
@@ -249,7 +249,7 @@ func upgradeDumpState(c *cli.Context) error {
// check v1
resp, err := http.Get(u + "/environments")
checkErr(err, "reach fission server")
if resp.StatusCode == 404 {
if resp.StatusCode == http.StatusNotFound {
msg := fmt.Sprintf("Server %v isn't a v1 Fission server. Use --server to point at a pre-0.2.x Fission server.", u)
fatal(msg)
}