format

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Templ

func Templ(src []byte, fileName string, config Config) (output []byte, changed bool, err error)

Templ formats templ source, returning the formatted output, whether it changed, and an error if any. The fileName is used for Go import processing, use an empty name if the source is not from a file.

Types

type Config

type Config struct {
	// TemplateExtension is the project's configured template extension,
	// needed to derive the generated Go file name during import
	// processing. Empty means the default.
	TemplateExtension string
}

Config configures formatting. ghtmx has no external formatter dependencies (the upstream templ Prettier integration was removed); the struct is kept so that a future option does not change the Templ signature.

Jump to

Keyboard shortcuts

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