Passed
Pull Request — main (#166)
by Yume
02:17
created

handlers.Render   A

Complexity

Conditions 1

Size

Total Lines 3
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nop 3
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
package handlers
2
3
import (
4
	"github.com/a-h/templ"
5
	"github.com/labstack/echo/v4"
6
)
7
8
func Render(c echo.Context, _ int, t templ.Component) error {
9
	c.Response().Writer.Header().Set(echo.HeaderContentType, echo.MIMETextHTML)
10
	return t.Render(c.Request().Context(), c.Response())
11
}
12