code: func (e Ext) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error) {
  	urlpath := strings.TrimSuffix(r.URL.Path, "/")
  	if path.Ext(urlpath) == "" && len(r.URL.Path) > 0 && r.URL.Path[len(r.URL.Path)-1] != '/' {
  		for _, ext := range e.Extensions {
  			if resourceExists(e.Root, urlpath+ext) {
  				r.URL.Path = urlpath + ext
  				break
  			}
  		}
  	}
  	return e.Next.ServeHTTP(w, r)
  }
docs: // ServeHTTP implements the httpserver.Handler interface.