File tree Expand file tree Collapse file tree 1 file changed +7
-24
lines changed Expand file tree Collapse file tree 1 file changed +7
-24
lines changed Original file line number Diff line number Diff line change 1
- package main
2
-
3
- // References otherwise-unused symbols so staticcheck (U1000) doesn't fail in the tutorial repo.
4
- // No runtime effect.
1
+ //go:build staticcheck
2
+ // +build staticcheck
5
3
6
- var (
7
- // Methods on *apiConfig — use method expressions
8
- _ = (* apiConfig ).handlerNotesGet
9
- _ = (* apiConfig ).handlerNotesCreate
10
- _ = (* apiConfig ).handlerUsersCreate
11
- _ = (* apiConfig ).handlerUsersGet
12
- _ = (* apiConfig ).middlewareAuth
4
+ package main
13
5
14
- // Plain functions
15
- _ = handleReadiness
16
- _ = generateRandomSHA256Hash
17
- _ = respondWithError
18
- _ = respondWithJSON
19
- _ = writeJSON
6
+ import "net/http"
20
7
21
- // Types / zero values
22
- _ = authMiddleware {}
8
+ // Stubs only for the staticcheck build tag.
9
+ func handleReadiness ( w http. ResponseWriter , r * http. Request ) {}
23
10
24
- // Model mapping helpers
25
- _ = databaseUserToUser
26
- _ = databaseNoteToNote
27
- _ = databasePostsToPosts
28
- )
11
+ func authMiddleware (next http.Handler ) http.Handler { return next }
You can’t perform that action at this time.
0 commit comments