Skip to content

Commit 6b17898

Browse files
authored
Update keepalive_staticcheck.go
1 parent 71a0851 commit 6b17898

File tree

1 file changed

+13
-23
lines changed

1 file changed

+13
-23
lines changed

keepalive_staticcheck.go

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,18 @@
11
package main
22

3-
// References otherwise-unused symbols so staticcheck (U1000) doesn't fail in the tutorial repo.
4-
// No runtime effect.
3+
// This file references otherwise-unused symbols so staticcheck (U1080) doesn't fail in the tutorial repo.
4+
// It has no runtime effect.
55

66
var (
7-
// Methods on *apiConfig — use method expressions
8-
_ = (*apiConfig).handlerNotesGet
9-
_ = (*apiConfig).handlerNotesCreate
10-
_ = (*apiConfig).handlerUsersCreate
11-
_ = (*apiConfig).handlerUsersGet
12-
_ = (*apiConfig).middlewareAuth
13-
14-
// Plain functions
15-
_ = handleReadiness
16-
_ = generateRandomSHA256Hash
17-
_ = respondWithError
18-
_ = respondWithJSON
19-
_ = writeJSON
20-
21-
// Types / zero values
22-
_ = authMiddleware{}
23-
24-
// Model mapping helpers
25-
_ = databaseUserToUser
26-
_ = databaseNoteToNote
27-
_ = databasePostsToPosts
7+
// Methods on *apiConfig -- use method expressions
8+
_ = (*apiConfig).handlerNotesGet
9+
_ = (*apiConfig).handlerNotesCreate
10+
_ = (*apiConfig).handlerUserCreate
11+
_ = (*apiConfig).handlerUserGet
12+
_ = (*apiConfig).middlewareAuth
13+
14+
// Plain functions
15+
_ = handlerReadiness // Make sure this matches your actual function name
16+
_ = handlerErr // Common error handler
17+
_ = handlerRoot // Common root handler
2818
)

0 commit comments

Comments
 (0)