INNER CODE UNIT · Go

func

GoAdminGroup/go-admin · context/context.go:549

func (app *App) AppendReqAndResp(url, method string, handler []Handler) {

	app.Requests = append(app.Requests, Path{
		URL:    join(app.Prefix, url),
		Method: method,
	})
	app.routeIndex++

	app.Handlers[Path{
		URL:    join(app.Prefix, url),
		Method: method,
	}] = append(app.Middlewares, handler...)
}

// Find is public helper method for findPath of tree.
func (app *App) Find(url, method string) []Handler {
	app.routeANY = false
	return app.Handlers[Path{URL: url, Method: method}]

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…