(ctx context.Context)
| 108 | var ctxKey ctxKeyType |
| 109 | |
| 110 | func (s *server) configFromContext(ctx context.Context) *Config { |
| 111 | if config, ok := ctx.Value(ctxKey).(*Config); ok { |
| 112 | return config |
| 113 | } |
| 114 | return &s.config |
| 115 | } |
| 116 | |
| 117 | func (s *server) now() time.Time { return time.Now().UTC() } |
| 118 |