Linter und Formatter für Go-Templates

djLint lintet und formatiert Go-Templates. Setzen Sie das Profil golang, damit Regeln und Formatierung zu ihnen passen.

Was sind Go-Templates?

Auf Go-Templates (text/template, html/template) bauen auch Hugo-Themes und Helm-Charts auf. Verwenden Sie für diese daher dasselbe Profil.

Über die Befehlszeile

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

Oder über eine Konfigurationsdatei

Konfigurieren Sie djLint in der Datei pyproject.toml, djlint.toml / .djlint.toml oder .djlintrc Ihres Projekts.

[tool.djlint]
profile = "golang"
profile = "golang"
{ "profile": "golang" }