From a22cb5cabe2bcc8ed02c43a66a1bd319cb28e89c Mon Sep 17 00:00:00 2001 From: Alan Donovan Date: Wed, 15 May 2024 17:41:56 -0400 Subject: runtime/debug: eliminate temporary variadicity from SetCrashOutput Updates #67182 Change-Id: I33fc8c515f4a9d120262ba30f61aea80ede5e9f8 Reviewed-on: https://go-review.googlesource.com/c/go/+/585420 LUCI-TryBot-Result: Go LUCI Reviewed-by: Austin Clements --- src/runtime/debug/stack.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/runtime/debug/stack.go') diff --git a/src/runtime/debug/stack.go b/src/runtime/debug/stack.go index dc7dc5d569..d7a860b7dc 100644 --- a/src/runtime/debug/stack.go +++ b/src/runtime/debug/stack.go @@ -46,14 +46,7 @@ type CrashOptions struct { // To disable this additional crash output, call SetCrashOutput(nil). // If called concurrently with a crash, some in-progress output may be written // to the old file even after an overriding SetCrashOutput returns. -// -// TODO(adonovan): the variadic ... is a short-term measure to avoid -// breaking the call in x/telemetry; it will be removed before the -// go1.23 freeze. -func SetCrashOutput(f *os.File, opts ...CrashOptions) error { - if len(opts) > 1 { - panic("supply at most 1 CrashOptions") - } +func SetCrashOutput(f *os.File, opts CrashOptions) error { fd := ^uintptr(0) if f != nil { // The runtime will write to this file descriptor from -- cgit v1.3