[build] internal/relui: replace httprouter use with http.ServeMux

0 views
Skip to first unread message

Gopher Robot (Gerrit)

unread,
Jan 16, 2026, 5:17:51 PM (2 days ago) Jan 16
to Dmitri Shuralyov, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Go LUCI, Michael Knyszek, Dmitri Shuralyov, golang-co...@googlegroups.com

Gopher Robot submitted the change with unreviewed changes

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
Reviewed-by: Dmitri Shuralyov <dmit...@google.com>
Reviewed-by: Michael Knyszek <mkny...@google.com>
Auto-Submit: Dmitri Shuralyov <dmit...@golang.org>
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:
  • requirement satisfiedCode-Review: +1 by Dmitri Shuralyov, +2 by Michael Knyszek
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: build
Gerrit-Branch: master
Gerrit-Change-Id: Ib5ac645c5db2c6f2406fcde596f4978a410198f2
Gerrit-Change-Number: 732261
Gerrit-PatchSet: 3
Gerrit-Owner: Dmitri Shuralyov <dmit...@golang.org>
Gerrit-Reviewer: Dmitri Shuralyov <dmit...@golang.org>
Gerrit-Reviewer: Dmitri Shuralyov <dmit...@google.com>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages