A webmail client. Forked from https://git.sr.ht/~migadu/alps
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

25 lines
413 B

  1. package koushin
  2. import (
  3. "fmt"
  4. "html/template"
  5. "io"
  6. "github.com/labstack/echo/v4"
  7. )
  8. type tmpl struct {
  9. t *template.Template
  10. }
  11. var _ = fmt.Printf
  12. func (t *tmpl) Render(w io.Writer, name string, data interface{}, c echo.Context) error {
  13. return t.t.ExecuteTemplate(w, name, data)
  14. }
  15. func loadTemplates() (*tmpl, error) {
  16. t, err := template.New("drmdb").ParseGlob("public/*.html")
  17. return &tmpl{t}, err
  18. }