Skip to content

Instantly share code, notes, and snippets.

@oxlb
Created March 9, 2019 22:33
Show Gist options
  • Save oxlb/9a2982b4344b522d99beb9c4b366ab52 to your computer and use it in GitHub Desktop.
Save oxlb/9a2982b4344b522d99beb9c4b366ab52 to your computer and use it in GitHub Desktop.
echo framework URL based versioning
package main
import (
"net/http"
"github.com/labstack/echo"
)
func main() {
e := echo.New()
e.GET("v1/todo", func(c echo.Context) error {
return c.String(http.StatusOK, "Hello, World!")
})
e.Logger.Fatal(e.Start(":1324"))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment