File tree 4 files changed +8
-13
lines changed
4 files changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ module github.com/issue9/mux/v8
3
3
require (
4
4
github.com/issue9/assert/v4 v4.3.0
5
5
github.com/issue9/errwrap v0.3.2
6
- github.com/issue9/source v0.10.0
6
+ github.com/issue9/source v0.11.2
7
7
)
8
8
9
9
require golang.org/x/mod v0.17.0 // indirect
Original file line number Diff line number Diff line change 1
- github.com/issue9/assert/v4 v4.2.0 h1:XJGMFYW0xfESqFRPLWbSsr0xWdkofytvQbDfNb5n9fw =
2
- github.com/issue9/assert/v4 v4.2.0 /go.mod h1:v7qDRXi7AsaZZNh8eAK2rkLJg5/clztqQGA1DRv9Lv4 =
3
1
github.com/issue9/assert/v4 v4.3.0 h1:W3XDKmttsfzihYGxJ9rJoL2ViJgWERB9IxfHcxjv65U =
4
2
github.com/issue9/assert/v4 v4.3.0 /go.mod h1:v7qDRXi7AsaZZNh8eAK2rkLJg5/clztqQGA1DRv9Lv4 =
5
3
github.com/issue9/errwrap v0.3.2 h1:7KEme9Pfe75M+sIMcPCn/DV90wjnOcRbO4DXVAHj3Fw =
6
4
github.com/issue9/errwrap v0.3.2 /go.mod h1:KcCLuUGiffjooLCUjL89r1cyO8/HT/VRcQrneO53N3A =
7
- github.com/issue9/source v0.9.1 h1:duANl/q03NzDtZN5sOPia+s4vBu8c1CqtHGoluY0Tto =
8
- github.com/issue9/source v0.9.1 /go.mod h1:8L8ef8XhMftlE2ZQ8j60h5hTGlQmPjm/8zvoXr5fnTY =
9
- github.com/issue9/source v0.10.0 h1:HhZ7QRRzeDzCvnxad2OfLpOlrHV3TdNzFybtKUO4h8M =
10
- github.com/issue9/source v0.10.0 /go.mod h1:MQYr1hupicwivCqFSH4FAc+eMT6VMTmKTNJOvqRacG0 =
5
+ github.com/issue9/source v0.11.2 h1:lA0/P0b/S4opasGXwWXDYSZfrEbyPOqpImUQdWMi9gE =
6
+ github.com/issue9/source v0.11.2 /go.mod h1:MQYr1hupicwivCqFSH4FAc+eMT6VMTmKTNJOvqRacG0 =
11
7
golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA =
12
8
golang.org/x/mod v0.17.0 /go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c =
Original file line number Diff line number Diff line change @@ -6,8 +6,9 @@ package header
6
6
7
7
// 一些报头的常用值
8
8
const (
9
- UTF8 = "utf-8"
10
- NoCache = "no-cache"
9
+ UTF8 = "utf-8"
10
+ NoCache = "no-cache"
11
+ Identity = "identity"
11
12
12
13
// MessageHTTP TRACE 请求方法的 content-type 值
13
14
MessageHTTP = "message/http"
Original file line number Diff line number Diff line change 39
39
middleware []types.MiddlewareOf [T ]
40
40
}
41
41
42
- // CallOf 指定如何调用用户自定义的对象 T
42
+ // CallOf 指定如何调用用户给定的类型 T
43
43
CallOf [T any ] func (http.ResponseWriter , * http.Request , types.Route , T )
44
44
45
45
// ResourceOf 以资源地址为对象的路由
@@ -99,9 +99,7 @@ func (r *RouterOf[T]) Routes() map[string][]string { return r.tree.Routes() }
99
99
//
100
100
// 当未指定 methods 时,将删除所有 method 匹配的项。
101
101
// 指定错误的 methods 值,将自动忽略该值。
102
- func (r * RouterOf [T ]) Remove (pattern string , methods ... string ) {
103
- r .tree .Remove (pattern , methods ... )
104
- }
102
+ func (r * RouterOf [T ]) Remove (pattern string , methods ... string ) { r .tree .Remove (pattern , methods ... ) }
105
103
106
104
// Use 使用中间件
107
105
func (r * RouterOf [T ]) Use (m ... types.MiddlewareOf [T ]) {
You can’t perform that action at this time.
0 commit comments