新增: u-tpl SQL 模板引擎完整实现
- Lexer/Parser/Executor 三阶段架构
- #{param} 参数化 + ${raw} 原样替换 + 白名单安全策略
- @if/@for/@tpl/@include/@namespace 控制流
- 表达式引擎: 比较、逻辑、nil 检查、len() 内置函数
- 支持 ?/$1/:1 多数据库占位符风格
- 零依赖,纯 Go 标准库实现
This commit is contained in:
@@ -27,7 +27,7 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/nicedoc/utpl"
|
||||
"gitea.1216.top/lxy/u-tpl"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -52,7 +52,7 @@ func main() {
|
||||
## 安装
|
||||
|
||||
```bash
|
||||
go get github.com/nicedoc/utpl
|
||||
go get gitea.1216.top/lxy/u-tpl
|
||||
```
|
||||
|
||||
---
|
||||
@@ -673,7 +673,7 @@ package main
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
"github.com/nicedoc/utpl"
|
||||
"gitea.1216.top/lxy/u-tpl"
|
||||
)
|
||||
|
||||
//go:embed tpl/order_search.tpl
|
||||
|
||||
Reference in New Issue
Block a user