Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbb538dd

Browse files
committed
added nil check for failing unit tests
1 parentab5db6e commitbb538dd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎coderd/httpmw/prometheus.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ func getRoutePattern(r *http.Request) string {
113113
}
114114

115115
tctx:=chi.NewRouteContext()
116-
if!rctx.Routes.Match(tctx,r.Method,routePath) {
116+
routes:=rctx.Routes
117+
ifroutes!=nil&&routes.Match(tctx,r.Method,routePath) {
117118
// No matching pattern, so just return an empty string.
118119
// It is done to avoid returning a static path for frontend requests.
119120
return""

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp