code: func (l *LARS) serveHTTP(w http.ResponseWriter, r *http.Request) {
  
  	c := l.pool.Get().(*Ctx)
  
  	c.parent.RequestStart(w, r)
  
  	if root := l.trees[r.Method]; root != nil {
  
  		if c.handlers, c.params, c.handlerName = root.find(r.URL.Path, c.params); c.handlers == nil {
  
  			c.params = c.params[0:0]
  
  			if l.redirectTrailingSlash && len(r.URL.Path) > 1 {
  
  				// find again all lowercase
  				orig := r.URL.Path
  				lc := strings.ToLower(orig)
  
  				if lc != r.URL.Path {
  
  					if c.handlers, _, _ = root.find(lc, c.params); c.handlers != nil {
  						r.URL.Path = lc
  						c.handlers = l.redirect(r.Method, r.URL.String())
  						r.URL.Path = orig
  						goto END
  					}
  				}
  
  				if lc[len(lc)-1:] == basePath {
  					lc = lc[:len(lc)-1]
  				} else {
  					lc = lc + basePath
  				}
  
  				if c.handlers, _, _ = root.find(lc, c.params); c.handlers != nil {
  					r.URL.Path = lc
  					c.handlers = l.redirect(r.Method, r.URL.String())
  					r.URL.Path = orig
  					goto END
  				}
  			}
  
  		} else {
  			goto END
  		}
  	}
  
  	if l.automaticallyHandleOPTIONS && r.Method == OPTIONS {
  		l.getOptions(c)
  		goto END
  	}
  
  	if l.handleMethodNotAllowed {
  
  		if l.checkMethodNotAllowed(c) {
  			goto END
  		}
  	}
  
  	// not found
  	c.handlers = l.notFound
  
  END:
  
  	c.parent.Next()
  	c.parent.RequestEnd()
  
  	l.pool.Put(c)
  }
docs: // Conforms to the http.Handler interface.