Fixes#65669
Change-Id: Ifd2011dd604fef399e4352b804fc2f6a9e74096e
Reviewed-on: https://go-review.googlesource.com/c/go/+/566237
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
CL 517775 moved early deadcode into unified writer. with new way to
handle dead code with label statement involved: any statements after
terminating statement will be considered dead until next label
statement.
However, this is not safe, because code after label statement may still
refer to dead statements between terminating and label statement.
It's only safe to remove statements after terminating *and* label one.
Fixes#65593
Change-Id: Idb630165240931fad50789304a9e4535f51f56e2
Reviewed-on: https://go-review.googlesource.com/c/go/+/565596
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
During calls to the race detector on arm64, we switch to the g0 stack if
we aren't already on it. If we are already on the g0 stack, the race
detector library code can then create a stack frame using the stack
pointer coming from Go code. The race detector library can go on to
write values to the top of its stack frame. But the Go ABI for arm64
saves the caller's frame pointer in the word below the current stack
frame. So, the saved frame pointer on the stack can be clobbered by the
race detector. Decrement the stack pointer to account for where the
frame pointer is saved, like we do for asmcgocall.
Change-Id: I66e5e4a671c3befc10776bac6869810ecf71790d
Reviewed-on: https://go-review.googlesource.com/c/go/+/561515
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
When readying a goroutine, the scheduler typically places the readied
goroutine in pp.runnext, which will typically be the next goroutine to
run in the schedule.
In order to prevent a set of ping-pong goroutines from simply switching
back and forth via runnext and starving the rest of the run queue, a
goroutine scheduled via runnext shares a time slice (pp.schedtick) with
the previous goroutine.
sysmon detects "long-running goroutines", which really means Ps using
the same pp.schedtick for too long, and preempts them to allow the rest
of the run queue to run. Thus this avoids starvation via runnext.
However, wasm has no threads, and thus no sysmon. Without sysmon to
preempt, the possibility for starvation returns. Avoid this by disabling
runnext entirely on wasm. This means that readied goroutines always go
on the end of the run queue and thus cannot starve via runnext.
Note that this CL doesn't do anything about single long-running
goroutines. Without sysmon to preempt them, a single goroutine that
fails to yield will starve the run queue indefinitely.
For #65178.
Change-Id: I10859d088776125a2af8c9cd862b6e071da628b5
Cq-Include-Trybots: luci.golang.try:gotip-js-wasm,gotip-wasip1-wasm_wasmtime,gotip-wasip1-wasm_wazero
Reviewed-on: https://go-review.googlesource.com/c/go/+/559798
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Add commentary explaining why and how we create method wrappers.
Change-Id: Idf35a77d0483f24c2163e11f5e001fd5536cca63
Reviewed-on: https://go-review.googlesource.com/c/go/+/558395
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
In CL https://golang.org/cl/550435, a segment that had already been reviewed and modified was rolled back due to an erroneous operation. Here, submit a correct code snippet.
Change-Id: I46adfad110d532aec5f557c350fe6dccbc583968
Reviewed-on: https://go-review.googlesource.com/c/go/+/565628
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: qiulaidongfeng <2645477756@qq.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Mateusz Poliwczak <mpoliwczak34@gmail.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Commit-Queue: Ian Lance Taylor <iant@golang.org>
When FileServer(Dir("file")) is used where "file" is a normal file and
not a directory, the server enters a redirect loop.
The usage of a file inplace of a directory path is not documented in
http.Dir and it could be considered undefined behavior.
This CL updates serveFile to check if we are trying to traverse a normal
file instead of a directory and return an error, preventing the redirect
loop.
Fixes#63769
Change-Id: I81e289444e7d0bd72189c2e7b763f5540333e2d0
GitHub-Last-Rev: 754c9a1167
GitHub-Pull-Request: golang/go#63860
Reviewed-on: https://go-review.googlesource.com/c/go/+/538719
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
Commit-Queue: Bryan Mills <bcmills@google.com>
With the new routing style in go 1.22, declaring
http.Handle("GET /", h)
generates a conflict with route "/debug/pprof/" and the others declared in
the net/http/pprof package. You get an error such as:
panic: pattern "GET /" (registered at .../pprof.go:94): GET / matches
fewer methods than /debug/pprof/, but has a more general path pattern
This patch prevents that error. Adding GET is correct because no other
method makes sense with the /debug/pprof routes. However, a tool using any
method other than GET will break.
We preserve the traditional behaviour when GODEBUG=httpmuxgo121=1 is
specified.
Updates #65723
Change-Id: I49c21f5f3e802ad7538062d824354b2e4d8a800e
GitHub-Last-Rev: 35e4012663
GitHub-Pull-Request: golang/go#65791
Reviewed-on: https://go-review.googlesource.com/c/go/+/565176
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
For #65898.
Change-Id: I495e53060ac56b88a551ccd9901f25bbce97c714
Reviewed-on: https://go-review.googlesource.com/c/go/+/567215
Reviewed-by: Alan Donovan <adonovan@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Robert Griesemer <gri@google.com>
os.Stat and os.Lstat on Windows use GetFileInformationByHandleEx to
retrieve file information for reparse points and files that
GetFileAttributesEx does not handle.
However, GetFileInformationByHandleEx is only necessary for
reparse points, so we can avoid the call for regular files.
With this change we can drop the FAT hack that was added in CL 154377,
as files won't have the FILE_ATTRIBUTE_REPARSE_POINT attribute set
on that file system.
Change-Id: Id18639067a6c3fa1bb2c6706d5b79358c224fe37
Reviewed-on: https://go-review.googlesource.com/c/go/+/566397
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Change-Id: Ia8e666b128622391d72e42449c01c4e10f3c9e1e
GitHub-Last-Rev: c74cf13b70
GitHub-Pull-Request: golang/go#65938
Reviewed-on: https://go-review.googlesource.com/c/go/+/566855
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: qiulaidongfeng <2645477756@qq.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Change-Id: I8c28dac73427e37d58d970b00d8f0f1413bede2e
GitHub-Last-Rev: a11a803602
GitHub-Pull-Request: golang/go#65932
Reviewed-on: https://go-review.googlesource.com/c/go/+/566695
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Joseph Tsai <joetsai@digital-static.net>
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Change-Id: I1bd3fdf0ceb9a83dbcc07f55b81489eb2c82c9ba
GitHub-Last-Rev: 05d49d7fb9
GitHub-Pull-Request: golang/go#65418
Reviewed-on: https://go-review.googlesource.com/c/go/+/560115
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Change-Id: Iba6014340d8b697a3a26b35e8d5a702ccf332e10
GitHub-Last-Rev: ef60463c7b
GitHub-Pull-Request: golang/go#65872
Reviewed-on: https://go-review.googlesource.com/c/go/+/565841
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Use fmt.Errorf %w verb to wrap errors in driverArgsConnLocked,
which allows for easier unwrapping and checking of error types.
Add tests in sql_test.go to ensure that Stmt.Exec and Stmt.Query
correctly wrap underlying Valuer errors, adhering to the new change.
Fixes#64707.
Change-Id: Id9f80e265735d0849ee7abba63e58e4c26e658ad
GitHub-Last-Rev: 0df367e0fb
GitHub-Pull-Request: golang/go#64728
Reviewed-on: https://go-review.googlesource.com/c/go/+/550116
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Use quotes to wrap user-supplied token in the syntax error message.
Updates #65790
Change-Id: I631a63df4a6bb8615b7850a324d812190bc15f30
GitHub-Last-Rev: f291e1d5a6
GitHub-Pull-Request: golang/go#65840
Reviewed-on: https://go-review.googlesource.com/c/go/+/565518
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Escape "</script" and "<!--" in errors returned from MarshalJSON errors
when attempting to marshal types in script blocks. This prevents any
user controlled content from prematurely terminating the script block.
Fixes#65697
Change-Id: Icf0e26c54ea7d9c1deed0bff11b6506c99ddef1b
Reviewed-on: https://go-review.googlesource.com/c/go/+/564196
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
This breaks an unbounded client-side retry loop if the server's
timeout happens to fire during its final read of the TLS handshake.
The retry loop was observed on wasm platforms at CL 557437.
I was also able to reproduce chains of dozens of retries on my
linux/amd64 workstation by adjusting some timeouts and adding a couple
of sleeps, as in this patch:
https://gist.github.com/bcmills/d0a0a57e5f64eebc24e8211d8ea502b3
However, on linux/amd64 on my workstation the test always eventually
breaks out of the retry loop due to timing jitter.
I couldn't find a retry-specific hook in the http.Client,
http.Transport, or tls.Config structs, so I have instead abused the
Transport.Proxy hook for this purpose. Separately, we may want to
consider adding a retry-specific hook, or changing the net/http
implementation to avoid transparently retrying in this case.
Fixes#65410.
Updates #65178.
Change-Id: I0e43c039615fe815f0a4ba99a8813c48b1fdc7e6
Reviewed-on: https://go-review.googlesource.com/c/go/+/559835
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
(found with x/tools/go/analysis/passes/nilness)
Change-Id: I1bdc7811efbecea95608e634f894cb6c656e3a5b
Reviewed-on: https://go-review.googlesource.com/c/go/+/564221
Reviewed-by: Robert Griesemer <gri@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Change-Id: Ife63c766cefc14d2f6bdd3c706f913b1b6f99949
GitHub-Last-Rev: 04e23349e6
GitHub-Pull-Request: golang/go#65929
Reviewed-on: https://go-review.googlesource.com/c/go/+/566099
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Change-Id: I76f4dc1e8bda98936c1198cb45ce8141ca88845b
Reviewed-on: https://go-review.googlesource.com/c/go/+/566235
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Change-Id: I77371ef99797e2b53f1292c9d6a4eb157f116f88
GitHub-Last-Rev: 7ce7d014c0
GitHub-Pull-Request: golang/go#65836
Reviewed-on: https://go-review.googlesource.com/c/go/+/565440
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: qiulaidongfeng <2645477756@qq.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Change-Id: I32580ffb31ffad05a7c8d3aa0c491aff9f55ea6a
GitHub-Last-Rev: 67516eaa18
GitHub-Pull-Request: golang/go#65565
Reviewed-on: https://go-review.googlesource.com/c/go/+/562316
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Change-Id: I430c9a7c4936d7a8c8c787aa63de9a796d20fdf3
Reviewed-on: https://go-review.googlesource.com/c/go/+/539597
Reviewed-by: Carlos Amedee <carlos@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: shuang cui <imcusg@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Change-Id: I0fcb79f471cdb8b464924d9b04c675f120861f67
Reviewed-on: https://go-review.googlesource.com/c/go/+/539835
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: shuang cui <imcusg@gmail.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Change-Id: Idbc110cfc4fd6bbbc8b79807ac14abf7b30e0e65
Reviewed-on: https://go-review.googlesource.com/c/go/+/539855
Run-TryBot: shuang cui <imcusg@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: qiulaidongfeng <2645477756@qq.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Signed-off-by: cui fliter <imcusg@gmail.com>
Change-Id: I85339293d4cfb691125f991ec7162e9be186efdc
Reviewed-on: https://go-review.googlesource.com/c/go/+/539599
Reviewed-by: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Change-Id: I9bc5fd29b0eec8ceadcfee2116de5e7524ef92c2
Reviewed-on: https://go-review.googlesource.com/c/go/+/539617
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Run-TryBot: shuang cui <imcusg@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Change-Id: I216189f181ee73d16602c5cc86eb4d6b439a142b
Reviewed-on: https://go-review.googlesource.com/c/go/+/566595
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Commit-Queue: Damien Neil <dneil@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Damien Neil <dneil@google.com>
Change-Id: I0911c59280e4a208a3deee1f70b47adc60fb734b
GitHub-Last-Rev: 12e95ade68
GitHub-Pull-Request: golang/go#65833
Reviewed-on: https://go-review.googlesource.com/c/go/+/565439
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
Refactor ParsePrefix to return a parsePrefixError containing the input
string and a detailed message on failure, improving error context and
maintaining consistent error formatting within the netip package.
Change-Id: I8d9fb2f833b0f96f43a14622e66e225b54440410
GitHub-Last-Rev: e17bec3afa
GitHub-Pull-Request: golang/go#65798
Reviewed-on: https://go-review.googlesource.com/c/go/+/565275
Auto-Submit: Michael Pratt <mpratt@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
The cgo resolver sends DNS queries for .local subdomain
lookups, just as we do in the go resolver.
We don't need to fallback to the cgo resolver for this
domains when nsswitch.conf uses only file and dns modules.
This has a benefit that we select a consistent resolver,
that is only based on the system configuration, regardless
of the queried domain.
Updates #63978
Change-Id: I9166103adb94d7ab52992925f413f361130e7c52
GitHub-Last-Rev: e2bc5874cb
GitHub-Pull-Request: golang/go#63986
Reviewed-on: https://go-review.googlesource.com/c/go/+/540555
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Change-Id: I0d42bca7c6ee63c05a0ca09c165f2f591edf7c34
Reviewed-on: https://go-review.googlesource.com/c/go/+/565356
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Change-Id: I79797be6b385c9927d68350334d7f7387007085f
GitHub-Last-Rev: 3daa3b144f
GitHub-Pull-Request: golang/go#65937
Reviewed-on: https://go-review.googlesource.com/c/go/+/566815
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Commit-Queue: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Add the Localize function, which takes an io/fs slash-separated path
and returns an operating system path.
Localize returns an error if the path cannot be represented on
the current platform.
Replace internal/safefile.FromFS with Localize,
which serves the same purpose as this function.
The internal/safefile package remains separate from path/filepath
to avoid a dependency cycle with the os package.
Fixes#57151
Change-Id: I75c88047ddea17808276761da07bf79172c4f6fc
Reviewed-on: https://go-review.googlesource.com/c/go/+/531677
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
With the new routing style in go 1.22, declaring
http.Handle("GET /", h)
generates a conflict with route "/debug/vars" declared in the expvar
package. You get an error such as:
panic: pattern "GET /" (registered at ...) conflicts with pattern
"/debug/vars" (registered at ...expvar.go:384): GET / matches fewer
methods than /debug/vars, but has a more general path pattern
This patch prevents that error. Adding GET is correct because no other
method makes sense with /debug/vars.
We preserve the traditional behaviour when GODEBUG=httpmuxgo121=1 is
specified.
Fixes#65723
Change-Id: Id2b963ebad41a1ebdcceb73baf3436d59aac73a0
GitHub-Last-Rev: 9c2b9f74a7
GitHub-Pull-Request: golang/go#65745
Reviewed-on: https://go-review.googlesource.com/c/go/+/564735
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Change-Id: I66965e6a61cf1726db06670978a4654b84f3fd72
GitHub-Last-Rev: 90023e4843
GitHub-Pull-Request: golang/go#65900
Reviewed-on: https://go-review.googlesource.com/c/go/+/566356
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Jorropo <jorropo.pgm@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TestAbs modifies the absTests global variable on Windows, which makes
the test to fail if it is run more than once, i.e. executing
"go test -run ^TestAbs$ -count 2 path/filepath".
This CL fixes the issue by clipping the absTests slices before
appending more elements to it.
Change-Id: I8f1144b2f10b8fa1b847e6639c0bda7baafc2dac
Reviewed-on: https://go-review.googlesource.com/c/go/+/566396
Reviewed-by: Bryan Mills <bcmills@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
Add "else with" action will reduce the template complexity in some use cases(#57646).
This action will be added:
{{with pipeline}} T1 {{else with pipeline}} T0 {{end}}.
Fixes#57646
Change-Id: I90ed546ab671805f753343b00bd3c9d1a1d5581d
Reviewed-on: https://go-review.googlesource.com/c/go/+/545376
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Currently when viewing directories on a phone, the text is small and
often hard to tap correctly. This commit adds the viewport property to
the page to make it look correct on phones. This commit also makes the
page behave in Standards Mode instead of Quirks Mode which does not
effect the behavior of this page but makes me feel good inside ☺️
Change-Id: I4babcf79085e85fba57453b7a235e4750a269a42
Reviewed-on: https://go-review.googlesource.com/c/go/+/552595
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Commit-Queue: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Max Coplan <mchcopl@gmail.com>
Fixes#65905
Change-Id: I42326d3b743e80d5226ea374eca5c9edaef4dd4d
Reviewed-on: https://go-review.googlesource.com/c/go/+/566535
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Commit-Queue: Ian Lance Taylor <iant@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>