Skip to content

Instantly share code, notes, and snippets.

@sumanentc
Created October 4, 2019 08:58
Show Gist options
  • Save sumanentc/250437eda8d6f86355b8823047eb15df to your computer and use it in GitHub Desktop.
Save sumanentc/250437eda8d6f86355b8823047eb15df to your computer and use it in GitHub Desktop.
package main
import (
"github.com/labstack/echo"
"fmt"
"net/http"
)
func main() {
// create a new echo instance
e := echo.New()
//QueryParam along with PathVariable Get API
e.GET("/cats/:data",GetCats)
//Post Request
e.POST("/cats", AddCat)
e.Logger.Fatal(e.Start(":8000"))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment