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.
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
Abschnitt betitelt „Über die Befehlszeile“djlint /path/to/templates --profile=golangIn einer Konfigurationsdatei
Abschnitt betitelt „In einer 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" }