mirror of
https://gitee.com/johng/gf.git
synced 2024-12-05 13:48:09 +08:00
18 lines
271 B
Go
18 lines
271 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"github.com/gogf/gf/g"
|
|
"github.com/gogf/gf/g/os/gview"
|
|
)
|
|
|
|
func main() {
|
|
g.View().Assigns(gview.Params{
|
|
"k1": "v1",
|
|
"k2": "v2",
|
|
})
|
|
b, err := g.View().ParseContent(`{{.k1}} - {{.k2}}`, nil)
|
|
fmt.Println(err)
|
|
fmt.Println(string(b))
|
|
}
|