improve code readable

This commit is contained in:
田欧 2018-06-22 09:26:32 +08:00 committed by GitHub
parent ee2262b48a
commit a37a344099
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,11 +31,11 @@ func main() {
c.JSON(http.StatusInternalServerError, gin.H{ c.JSON(http.StatusInternalServerError, gin.H{
"error": err.Error(), "error": err.Error(),
}) })
} else { }
c.JSON(http.StatusOK, gin.H{ c.JSON(http.StatusOK, gin.H{
"result": fmt.Sprint(res.Message), "result": fmt.Sprint(res.Message),
}) })
}
}) })
// Run http server // Run http server