Workiing example

This commit is contained in:
Eden Kirin
2024-01-21 00:29:34 +01:00
parent 9d76a8dc22
commit 1bfc72b44b
4 changed files with 122 additions and 5 deletions

View File

@ -1,15 +1,11 @@
package handlers
import (
"net/http"
"templ-tests/app/templates"
"github.com/gin-gonic/gin"
)
func Home(c *gin.Context) {
content := templates.Home()
c.Data(http.StatusOK, "text/html; charset=utf-8", []byte(content))
templates.Home("World").Render(c, c.Writer)
}