diff options
-rw-r--r-- | main.go | 6 |
1 files changed, 0 insertions, 6 deletions
@@ -18,16 +18,12 @@ func main() { e.Logger.Fatal(e.Start(":3000")) } -//http://localhost:3000/hello -//{"message":"Hello World"} func Greetings(c echo.Context) error { return c.JSON(http.StatusOK, HelloWorld{ Message: "Hello World", }) } -//http://localhost:3000/hello/Saumit -//{"message":"Hello World, my name is Saumit"} func GreetingsWithParams(c echo.Context) error { params := c.Param("name") return c.JSON(http.StatusOK, HelloWorld{ @@ -35,8 +31,6 @@ func GreetingsWithParams(c echo.Context) error { }) } -//http://localhost:3000/hello-queries?name=Saumit -//{"message":"Hello World, I'm using queries and my name is Saumit"} func GreetingsWithQuery(c echo.Context) error { query := c.QueryParam("name") return c.JSON(http.StatusOK, HelloWorld{ |