Documentation ¶
Overview ¶
Package routertest 提供针对路由的测试用例
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Tester ¶
type Tester[T any] struct { // contains filtered or unexported fields }
func NewTester ¶
func NewTester[T any](c mux.CallOf[T], notFound T, m, o types.BuildNodeHandleOf[T]) *Tester[T]
func (*Tester[T]) Bench ¶
Bench 执行所有的性能测试
h 表示路由的处理函数,只要向终端输出 URL.Path 值即可, 以 T 的类型为 http.HandlerFunc 为例:
func(w http.ResponseWriter, r *http.Request) { w.Write([]byte(r.URL.Path)) }
Click to show internal directories.
Click to hide internal directories.