withAdminUser adds the admin user to the context.
(ctx context.Context, u *models.User)
| 201 | |
| 202 | // withAdminUser adds the admin user to the context. |
| 203 | func withAdminUser(ctx context.Context, u *models.User) context.Context { |
| 204 | return context.WithValue(ctx, adminUserKey, u) |
| 205 | } |
| 206 | |
| 207 | // getAdminUser reads the admin user from the context. |
| 208 | func getAdminUser(ctx context.Context) *models.User { |