File tree Expand file tree Collapse file tree 1 file changed +12
-14
lines changed Expand file tree Collapse file tree 1 file changed +12
-14
lines changed Original file line number Diff line number Diff line change 1
1
package main
2
2
3
- // This file references otherwise-unused symbols so staticcheck (U1000) doesn't fail in the tutorial repo.
4
- // It has no runtime effect.
3
+ // References otherwise-unused symbols so staticcheck (U1000) doesn't fail in the tutorial repo.
4
+ // No runtime effect.
5
5
6
6
var (
7
- _ = apiConfig {}
7
+ // Methods on *apiConfig — use method expressions
8
+ _ = (* apiConfig ).handlerNotesGet
9
+ _ = (* apiConfig ).handlerNotesCreate
10
+ _ = (* apiConfig ).handlerUsersCreate
11
+ _ = (* apiConfig ).handlerUsersGet
12
+ _ = (* apiConfig ).middlewareAuth
8
13
9
- // handlers
10
- _ = handlerNotesGet
11
- _ = handlerNotesCreate
12
- _ = handlerReadiness
13
- _ = handlerUsersCreate
14
- _ = handlerUsersGet
15
-
16
- // helpers
14
+ // Plain functions
15
+ _ = handleReadiness
17
16
_ = generateRandomSHA256Hash
18
17
_ = respondWithError
19
18
_ = respondWithJSON
20
19
_ = writeJSON
21
20
22
- // middleware
21
+ // Types / zero values
23
22
_ = authMiddleware {}
24
- _ = middlewareAuth
25
23
26
- // model mappers
24
+ // Model mapping helpers
27
25
_ = databaseUserToUser
28
26
_ = databaseNoteToNote
29
27
_ = databasePostsToPosts
You can’t perform that action at this time.
0 commit comments