Documentation ¶
Overview ¶
Package routertest 提供针对路由的测试用例
NOTE: 只提供针对不同的类型参数 T 可能造成不周结果的测试。
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 (*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.