code: func (e *Engine) LoadDirectory(directory string, extension string) error {
  	opt := amber.DirOptions{}
  	opt.Recursive = true
  
  	// prepare the global amber funcs
  	funcs := template.FuncMap{}
  
  	for k, v := range amber.FuncMap { // add the amber's default funcs
  		funcs[k] = v
  	}
  
  	if e.Config.Funcs != nil { // add the config's funcs
  		for k, v := range e.Config.Funcs {
  			funcs[k] = v
  		}
  	}
  
  	amber.FuncMap = funcs //set the funcs
  	opt.Ext = extension
  
  	templates, err := amber.CompileDir(directory, opt, amber.DefaultOptions) // this returns the map with stripped extension, we want extension so we copy the map
  	if err == nil {
  		e.mu.Lock()
  		defer e.mu.Unlock()
  		e.templateCache = make(map[string]*template.Template)
  		for k, v := range templates {
  			name := filepath.ToSlash(k + opt.Ext)
  			e.templateCache[name] = v
  			delete(templates, k)
  		}
  
  	}
  	return err
  }
docs: // LoadDirectory builds the amber templates