code: func (runtimeLoader *templateRuntime) templateLoad(name, lang string) (tmpl Template) {
  	langName := name
  	found := false
  	if lang != "" {
  		// Look up and return the template.
  		langName = name + "." + lang
  		tmpl, found = runtimeLoader.templateMap[langName]
  		if found {
  			return
  		}
  		tmpl, found = runtimeLoader.templateMap[name]
  	} else {
  		tmpl, found = runtimeLoader.templateMap[name]
  		if found {
  			return
  		}
  	}
  
  	if !found {
  		// Neither name is found
  		// Look up and return the template.
  		for _, engine := range runtimeLoader.templatesAndEngineList {
  			if tmpl = engine.Lookup(langName); tmpl != nil {
  				found = true
  				break
  			}
  			if tmpl = engine.Lookup(name); tmpl != nil {
  				found = true
  				break
  			}
  		}
  		if !found {
  			return
  		}
  	}
  
  	// If we found anything store it in the map, we need to copy so we do not
  	// run into concurrency issues
  	runtimeLoader.loader.templateMutex.Lock()
  	defer runtimeLoader.loader.templateMutex.Unlock()
  
  	// In case another thread has loaded the map, reload the atomic value and check
  	newRuntimeLoader := runtimeLoader.loader.runtimeLoader.Load().(*templateRuntime)
  	if newRuntimeLoader.version != runtimeLoader.version {
  		return
  	}
  
  	newTemplateMap := map[string]Template{}
  	for k, v := range newRuntimeLoader.templateMap {
  		newTemplateMap[k] = v
  	}
  	newTemplateMap[langName] = tmpl
  	if _, found := newTemplateMap[name]; !found {
  		newTemplateMap[name] = tmpl
  	}
  	runtimeCopy := &templateRuntime{}
  	*runtimeCopy = *newRuntimeLoader
  	runtimeCopy.templateMap = newTemplateMap
  
  	// Set the atomic value
  	runtimeLoader.loader.runtimeLoader.Store(runtimeCopy)
  	return
  }
docs: // Load and also updates map if name is not found (to speed up next lookup)