mirror of
https://github.com/github/codeql.git
synced 2026-05-01 03:35:13 +02:00
Fix frontend errors in Mux tests.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package main
|
||||
|
||||
//go:generate depstubber -vendor github.com/gorilla/mux "" Vars
|
||||
//go:generate depstubber -vendor github.com/gorilla/mux "" Vars,NewRouter
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
238
ql/test/library-tests/semmle/go/frameworks/Mux/vendor/github.com/gorilla/mux/stub.go
generated
vendored
238
ql/test/library-tests/semmle/go/frameworks/Mux/vendor/github.com/gorilla/mux/stub.go
generated
vendored
@@ -2,15 +2,251 @@
|
||||
// This is a simple stub for github.com/gorilla/mux, strictly for use in testing.
|
||||
|
||||
// See the LICENSE file for information about the licensing of the original library.
|
||||
// Source: github.com/gorilla/mux (exports: ; functions: Vars)
|
||||
// Source: github.com/gorilla/mux (exports: ; functions: Vars,NewRouter)
|
||||
|
||||
// Package mux is a stub of github.com/gorilla/mux, generated by depstubber.
|
||||
package mux
|
||||
|
||||
import (
|
||||
http "net/http"
|
||||
url "net/url"
|
||||
)
|
||||
|
||||
type BuildVarsFunc func(map[string]string) map[string]string
|
||||
|
||||
type MatcherFunc func(*http.Request, *RouteMatch) bool
|
||||
|
||||
func (_ MatcherFunc) Match(_ *http.Request, _ *RouteMatch) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
type MiddlewareFunc func(http.Handler) http.Handler
|
||||
|
||||
func (_ MiddlewareFunc) Middleware(_ http.Handler) http.Handler {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewRouter() *Router {
|
||||
return nil
|
||||
}
|
||||
|
||||
type Route struct{}
|
||||
|
||||
func (_ *Route) BuildOnly() *Route {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ *Route) BuildVarsFunc(_ BuildVarsFunc) *Route {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ *Route) GetError() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ *Route) GetHandler() http.Handler {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ *Route) GetHostTemplate() (string, error) {
|
||||
return "", nil
|
||||
}
|
||||
|
||||
func (_ *Route) GetMethods() ([]string, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (_ *Route) GetName() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (_ *Route) GetPathRegexp() (string, error) {
|
||||
return "", nil
|
||||
}
|
||||
|
||||
func (_ *Route) GetPathTemplate() (string, error) {
|
||||
return "", nil
|
||||
}
|
||||
|
||||
func (_ *Route) GetQueriesRegexp() ([]string, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (_ *Route) GetQueriesTemplates() ([]string, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (_ *Route) Handler(_ http.Handler) *Route {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ *Route) HandlerFunc(_ func(http.ResponseWriter, *http.Request)) *Route {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ *Route) Headers(_ ...string) *Route {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ *Route) HeadersRegexp(_ ...string) *Route {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ *Route) Host(_ string) *Route {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ *Route) Match(_ *http.Request, _ *RouteMatch) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (_ *Route) MatcherFunc(_ MatcherFunc) *Route {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ *Route) Methods(_ ...string) *Route {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ *Route) Name(_ string) *Route {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ *Route) Path(_ string) *Route {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ *Route) PathPrefix(_ string) *Route {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ *Route) Queries(_ ...string) *Route {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ *Route) Schemes(_ ...string) *Route {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ *Route) SkipClean() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (_ *Route) Subrouter() *Router {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ *Route) URL(_ ...string) (*url.URL, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (_ *Route) URLHost(_ ...string) (*url.URL, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (_ *Route) URLPath(_ ...string) (*url.URL, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
type RouteMatch struct {
|
||||
Route *Route
|
||||
Handler http.Handler
|
||||
Vars map[string]string
|
||||
MatchErr error
|
||||
}
|
||||
|
||||
type Router struct {
|
||||
NotFoundHandler http.Handler
|
||||
MethodNotAllowedHandler http.Handler
|
||||
KeepContext bool
|
||||
}
|
||||
|
||||
func (_ *Router) BuildVarsFunc(_ BuildVarsFunc) *Route {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ *Router) Get(_ string) *Route {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ *Router) GetRoute(_ string) *Route {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ *Router) Handle(_ string, _ http.Handler) *Route {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ *Router) HandleFunc(_ string, _ func(http.ResponseWriter, *http.Request)) *Route {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ *Router) Headers(_ ...string) *Route {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ *Router) Host(_ string) *Route {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ *Router) Match(_ *http.Request, _ *RouteMatch) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (_ *Router) MatcherFunc(_ MatcherFunc) *Route {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ *Router) Methods(_ ...string) *Route {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ *Router) Name(_ string) *Route {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ *Router) NewRoute() *Route {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ *Router) Path(_ string) *Route {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ *Router) PathPrefix(_ string) *Route {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ *Router) Queries(_ ...string) *Route {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ *Router) Schemes(_ ...string) *Route {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ *Router) ServeHTTP(_ http.ResponseWriter, _ *http.Request) {}
|
||||
|
||||
func (_ *Router) SkipClean(_ bool) *Router {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ *Router) StrictSlash(_ bool) *Router {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ *Router) Use(_ ...MiddlewareFunc) {}
|
||||
|
||||
func (_ *Router) UseEncodedPath() *Router {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ *Router) Walk(_ WalkFunc) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func Vars(_ *http.Request) map[string]string {
|
||||
return nil
|
||||
}
|
||||
|
||||
type WalkFunc func(*Route, *Router, []*Route) error
|
||||
|
||||
Reference in New Issue
Block a user