feat: add parseParams

This commit is contained in:
Justin Lin committed 2025-07-25 02:01:57 +10:00
1 parent 437efc6f2e
commit 12dcbb460c
2 files changed
+30 -4

No files matched your search

+7 -4
View File
@@ -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)
}