more updates around making a new project

This commit is contained in:
cubixle
2022-07-22 16:51:46 +01:00
parent ff351c2f6f
commit 6a93d24444
5 changed files with 85 additions and 105 deletions
+18
View File
@@ -0,0 +1,18 @@
package http
import (
"github.com/labstack/echo/v4"
"github.com/sirupsen/logrus"
)
type HTTP struct {
log *logrus.Logger
}
func RegisterRoutes(e *echo.Echo, log *logrus.Logger) {
h := HTTP{log: log}
e.HTTPErrorHandler = h.DefaultErrorHandler
e.GET("/", h.DefaultHandler)
}