FromContext returns the epoch associated with the context. FromContext does not fall back to read the SOURCE_DATE_EPOCH env var.
(ctx context.Context)
| 33 | // FromContext returns the epoch associated with the context. |
| 34 | // FromContext does not fall back to read the SOURCE_DATE_EPOCH env var. |
| 35 | func FromContext(ctx context.Context) *time.Time { |
| 36 | v := ctx.Value(epochKey{}) |
| 37 | if v == nil { |
| 38 | return nil |
| 39 | } |
| 40 | return v.(*time.Time) |
| 41 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…