From 20172402c22839a6b720eb631229a09a7d479056 Mon Sep 17 00:00:00 2001 From: Carrano Date: Tue, 25 Aug 2026 10:27:40 +0200 Subject: [PATCH] fix: remove unnecessary panic("unreachable") after os.Exit(1) in auth_status.go Same issue as flagged on cmd/api_spec.go: this pattern only guards against a real SA5011 false positive, and none of the three os.Exit(1) calls here are followed by code that dereferences anything from the failed call. Verified by removing all three and confirming staticcheck, go vet, and go build stay clean. --- cmd/auth_status.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/cmd/auth_status.go b/cmd/auth_status.go index 132a0f97..bece2767 100644 --- a/cmd/auth_status.go +++ b/cmd/auth_status.go @@ -38,7 +38,6 @@ Exit code is 0 when authenticated, 1 otherwise.`, APIURL: utils.GetAPIBaseURL(), }) os.Exit(1) - panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } // GetAccessToken only verifies validity server-side for browser/device-flow @@ -54,7 +53,6 @@ Exit code is 0 when authenticated, 1 otherwise.`, APIURL: utils.GetAPIBaseURL(), }) os.Exit(1) - panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } output := authStatusOutput{ @@ -94,7 +92,6 @@ func printAuthStatus(output authStatusOutput) { if err != nil { utils.PrintlnError(err) os.Exit(1) - panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } utils.Println(string(jsonBytes)) return