fix: resolve 8 staticcheck lint errors in test files

SA1029: use typed context key instead of string in main_test.go
S1039: remove unnecessary fmt.Sprintf in validation_test.go
SA4023: fix unreachable nil check on concrete error type
SA4006: fix unused variable assignments in stepca_test.go (4 occurrences)
SA4000: fix duplicate expression in ssh_test.go (BEGIN vs END CERTIFICATE)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
shankar0123
2026-04-09 23:27:57 -04:00
parent 7382e5f03b
commit 370f856725
4 changed files with 17 additions and 17 deletions
+2 -1
View File
@@ -512,7 +512,8 @@ func TestMain_ContentTypeMiddleware(t *testing.T) {
// TestMain_ContextPropagation verifies context is propagated through middleware.
func TestMain_ContextPropagation(t *testing.T) {
testKey := "test-key"
type contextKey string
testKey := contextKey("test-key")
testValue := "test-value"
baseHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {