Unreviewed changes
1 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: internal/relui/web.go
Insertions: 1, Deletions: 1.
@@ -101,7 +101,7 @@
s.m.HandleFunc("GET /new_workflow", s.newWorkflowHandler)
s.m.HandleFunc("POST /workflows", s.createWorkflowHandler)
s.m.ServeFiles("GET /static/", static)
- s.m.HandleFunc("GET /$", s.homeHandler)
+ s.m.HandleFunc("GET /{$}", s.homeHandler)
if baseURL != nil && baseURL.Path != "/" && baseURL.Path != "" {
nosuffix := strings.TrimSuffix(baseURL.Path, "/")
s.bm = new(http.ServeMux)
```
Change information
Commit message:
internal/relui: replace httprouter use with http.ServeMux
ServeMux in the net/http package of the Go standard library gained
useful features in Go 1.22, including the ability to match wildcards
in patterns, and register handlers with an HTTP method. The httprouter
package has these features and was used for relui's routing needs prior
to Go 1.22.
By now, it works quite well to migrate back to net/http and its standard
ServeMux router. This is done to simplify the code and reduce the number
of dependencies slightly.
For golang/go#76860.
Change-Id: Ib5ac645c5db2c6f2406fcde596f4978a410198f2
Files:
- M go.mod
- M internal/relui/metrics.go
- M internal/relui/web.go
- M internal/relui/web_test.go
Change size: M
Delta: 4 files changed, 62 insertions(+), 123 deletions(-)
Branch: refs/heads/master
Submit Requirements:
Code-Review: +1 by Dmitri Shuralyov, +2 by Michael Knyszek
TryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI