func (h *HTML) Update() error {
	changed, err := h.Stat()
	if err != nil {
		return err
	}
	if !changed {
		return nil
	}
	if err := h.Open(os.O_RDONLY); err != nil {
		return err
	}
	defer h.Close()
	raw, err := h.ReadString()
	if err != nil {
		return err
	}
	h.tmpl, err = template.New(h.Name).Funcs(template.FuncMap(functions())).Parse(raw)
	return err
}
// Update re-reads the template from disk if it has changed
Update re-reads the template from disk if it has changed
// Update re - reads the template from disk if it has changed
func (h *HTML) Update() error {
	changed, err := h.Stat()
	if err != nil {
		return err
	}
	if !changed {
		return nil
	}
	if err := h.Open(os.O_RDONLY); err != nil {
		return err
	}
	defer h.Close()
	raw, err := h.ReadString()
	if err != nil {
		return err
	}
	h.tmpl, err = template.New(h.Name).Funcs(template.FuncMap(functions())).Parse(raw)
	return err
}
func ( h * HTML ) Update ( ) error { changed , err := h . Stat ( ) if err != nil { return err } if ! changed { return nil } if err := h . Open ( os . O_RDONLY ) ; err != nil { return err } defer h . Close ( ) raw , err := h . ReadString ( ) if err != nil { return err } h . tmpl , err = template . New ( h . Name ) . Funcs ( template . FuncMap ( functions ( ) ) ) . Parse ( raw ) return err }
Update re-reads the template from disk if it has changed
Update re - reads the template from disk if it has changed