Load parses the templates to the engine. It's also responsible to add the necessary global functions. Returns an error if something bad happens, caller is responsible to handle that.
()
| 237 | // |
| 238 | // Returns an error if something bad happens, caller is responsible to handle that. |
| 239 | func (s *HTMLEngine) Load() error { |
| 240 | s.rmu.Lock() |
| 241 | defer s.rmu.Unlock() |
| 242 | |
| 243 | return s.load() |
| 244 | } |
| 245 | |
| 246 | func (s *HTMLEngine) load() error { |
| 247 | if s.onLoad != nil { |