cloneTime returns a pointer to a copy of t, or nil when t is nil, so callers moving timestamps between the record and gh.Credential never share the underlying *time.Time.
(t *time.Time)
| 593 | // cloneTime returns a pointer to a copy of t, or nil when t is nil, so callers moving timestamps between the record |
| 594 | // and gh.Credential never share the underlying *time.Time. |
| 595 | func cloneTime(t *time.Time) *time.Time { |
| 596 | if t == nil { |
| 597 | return nil |
| 598 | } |
| 599 | return new(*t) |
| 600 | } |
| 601 | |
| 602 | // normalizeToUTC returns a copy of the record with any expiration timestamps converted to UTC, so stored records use |
| 603 | // a single canonical timezone regardless of how the caller constructed them. |
no outgoing calls
no test coverage detected