Go 的类 Django 语法模板引擎
pongo2 是一种类似 Django 语法的模板语言(官方网站)。
使用 go get 安装/更新(pongo2 不依赖任何第三方包):
go get -u github.com/flosch/pongo2/v7如果您在使用 pongo2 时遇到任何问题,或者需要帮助实现标签或过滤器,请使用问题跟踪器(创建工单!)。
:question: 正在寻找 Go 开发人员/顾问? 我目前可接受雇佣。:man_technologist:
<html>
<head>
<title>Our admins and users</title>
</head>
{# This is a short example to give you a quick overview of pongo2's syntax. #}
{% macro user_details(user, is_admin=false) %}
{% endmacro %}
<body>
<h1>Our admins</h1>
{% for admin in adminlist %} {{ user_details(admin, true) }} {% endfor %}
<h1>Our members</h1>
{% for user in userlist %} {{ user_details(user) }} {% endfor %}
</body>
</html>暂无开放 Issues,或尚未同步最近议题。