(relativeName string)
| 191 | } |
| 192 | |
| 193 | func (s *HandlebarsEngine) fromCache(relativeName string) *raymond.Template { |
| 194 | if s.reload { |
| 195 | s.rmu.RLock() |
| 196 | defer s.rmu.RUnlock() |
| 197 | } |
| 198 | |
| 199 | if tmpl, ok := s.templateCache[relativeName]; ok { |
| 200 | return tmpl |
| 201 | } |
| 202 | |
| 203 | return nil |
| 204 | } |
| 205 | |
| 206 | func (s *HandlebarsEngine) executeTemplateBuf(name string, binding interface{}) (string, error) { |
| 207 | if tmpl := s.fromCache(name); tmpl != nil { |
no outgoing calls
no test coverage detected