SetLastModified sets the "Last-Modified" based on the "modtime" input. If "modtime" is zero then it does nothing. It's mostly internally on core/router and context packages.
(modtime time.Time)
| 3434 | // |
| 3435 | // It's mostly internally on core/router and context packages. |
| 3436 | func (ctx *Context) SetLastModified(modtime time.Time) { |
| 3437 | if !IsZeroTime(modtime) { |
| 3438 | ctx.Header(LastModifiedHeaderKey, FormatTime(ctx, modtime.UTC())) // or modtime.UTC()? |
| 3439 | } |
| 3440 | } |
| 3441 | |
| 3442 | // ErrPreconditionFailed may be returned from `Context` methods |
| 3443 | // that has to perform one or more client side preconditions before the actual check, e.g. `CheckIfModifiedSince`. |
no test coverage detected