mirror of
https://github.com/lancatlin/mdsh.git
synced 2026-11-08 03:30:12 +08:00
feat: add parseParams
This commit is contained in:
1 parent
437efc6f2e
commit
12dcbb460c
2 files changed
+30
-4
No files matched your search
@@ -2,6 +2,7 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
)
|
||||
|
||||
var tmpl = `
|
||||
@@ -27,8 +28,10 @@ func main() {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
fmt.Printf("'%s'", templateMeta)
|
||||
render(body, map[string]string{
|
||||
"from": "2025-07-15",
|
||||
})
|
||||
fmt.Println(templateMeta)
|
||||
ctx, err := parseParams(templateMeta)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
render(body, ctx)
|
||||
}
|
||||
Reference in new issue
Block a user