htmgo/framework/h/render.go

15 lines
229 B
Go
Raw Normal View History

2024-01-22 15:22:16 +00:00
package h
import (
"fmt"
2024-09-11 00:52:18 +00:00
"time"
2024-01-22 15:22:16 +00:00
)
func Render(node Ren) string {
2024-09-11 00:52:18 +00:00
start := time.Now()
html := node.Render()
2024-09-11 00:52:18 +00:00
duration := time.Since(start)
fmt.Printf("render took %d microseconds\n", duration.Microseconds())
return html
2024-01-22 15:22:16 +00:00
}