templ

package module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2024 License: MIT Imports: 4 Imported by: 0

README

Azugo Templ rendering

status-badge

Azugo framework Templ HTML template rendering support.

Usage

	app.Get("/", func(ctx *azugo.Context) {
		templ.Render(ctx, index())
	})

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render

func Render(ctx *azugo.Context, component templ.Component, opts ...Option)

Render a component to the response.

Types

type ContentType

type ContentType string

ContentType sets the content type of the response.

type Option

type Option interface {
	// contains filtered or unexported methods
}

func Streaming

func Streaming() Option

Streaming render directly to response instead of buffering.

It is recommended to use this option for large responses but can result in partial responses being written to the client if the component errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL