Go Template Linter and Formatter

djLint is a Go template linter and a Go template formatter! Take advantage of the pre-build profile when linting and formatting your templates with djLint.

What are Go templates?

Go templates (text/template, html/template) also power Hugo themes and Helm charts, so use this same profile for them.

Using the Command Line

djlint /path/to/templates --profile=golang

Or, Use a Config File

Configure djLint in your projects pyproject.toml.

[tool.djlint]
profile="golang"
Edit this page Updated Aug 3, 2026