From a37a34409989c9788d1a2b7011983a7436eb76e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B0=E6=AC=A7?= Date: Fri, 22 Jun 2018 09:26:32 +0800 Subject: [PATCH] improve code readable --- examples/grpc/gin/main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/grpc/gin/main.go b/examples/grpc/gin/main.go index 152af1be..dd683262 100644 --- a/examples/grpc/gin/main.go +++ b/examples/grpc/gin/main.go @@ -31,11 +31,11 @@ func main() { c.JSON(http.StatusInternalServerError, gin.H{ "error": err.Error(), }) - } else { - c.JSON(http.StatusOK, gin.H{ - "result": fmt.Sprint(res.Message), - }) } + + c.JSON(http.StatusOK, gin.H{ + "result": fmt.Sprint(res.Message), + }) }) // Run http server