1
0
mirror of https://github.com/labstack/echo.git synced 2024-12-24 20:14:31 +02:00
echo/group.go
Vishal Rana ac527ab4da Better implementation for serving static files.
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-05-27 14:07:52 -07:00

70 lines
1.2 KiB
Go

package echo
type (
Group struct {
echo Echo
}
)
func (g *Group) Use(m ...Middleware) {
for _, h := range m {
g.echo.middleware = append(g.echo.middleware, wrapMiddleware(h))
}
}
func (g *Group) Connect(path string, h Handler) {
g.echo.Connect(path, h)
}
func (g *Group) Delete(path string, h Handler) {
g.echo.Delete(path, h)
}
func (g *Group) Get(path string, h Handler) {
g.echo.Get(path, h)
}
func (g *Group) Head(path string, h Handler) {
g.echo.Head(path, h)
}
func (g *Group) Options(path string, h Handler) {
g.echo.Options(path, h)
}
func (g *Group) Patch(path string, h Handler) {
g.echo.Patch(path, h)
}
func (g *Group) Post(path string, h Handler) {
g.echo.Post(path, h)
}
func (g *Group) Put(path string, h Handler) {
g.echo.Put(path, h)
}
func (g *Group) Trace(path string, h Handler) {
g.echo.Trace(path, h)
}
func (g *Group) WebSocket(path string, h HandlerFunc) {
g.echo.WebSocket(path, h)
}
func (g *Group) Static(path, root string) {
g.echo.Static(path, root)
}
func (g *Group) ServeDir(path, root string) {
g.echo.ServeDir(path, root)
}
func (g *Group) ServeFile(path, file string) {
g.echo.ServeFile(path, file)
}
func (g *Group) Group(prefix string, m ...Middleware) *Group {
return g.echo.Group(prefix, m...)
}