InitTimes initializes time.Time variables in the header to current time.
()
| 386 | |
| 387 | // InitTimes initializes time.Time variables in the header to current time. |
| 388 | func (h *ObjHeader) InitTimes() { |
| 389 | if h.CreatedAt.IsZero() { |
| 390 | h.CreatedAt = TimeNow() |
| 391 | } |
| 392 | h.UpdatedAt = h.CreatedAt |
| 393 | } |
| 394 | |
| 395 | // MergeTimes intelligently copies time.Time variables from h2 to h. |
| 396 | func (h *ObjHeader) MergeTimes(h2 *ObjHeader) { |
no test coverage detected