formatTime formats time with specified layout. TODO(yuzefovich): consider using this function in more places.
(t time.Time, layout string)
| 4177 | // formatTime formats time with specified layout. |
| 4178 | // TODO(yuzefovich): consider using this function in more places. |
| 4179 | func formatTime(t time.Time, layout string) string { |
| 4180 | // We only need FmtCtx to access its buffer so |
| 4181 | // that we get 0 amortized allocations. |
| 4182 | ctx := NewFmtCtx(FmtSimple) |
| 4183 | ctx.Write(t.AppendFormat(ctx.scratch[:0], layout)) |
| 4184 | return ctx.CloseAndGetString() |
| 4185 | } |
| 4186 | |
| 4187 | // ResolvedType implements the TypedExpr interface. |
| 4188 | func (*DJSON) ResolvedType() *types.T { |
no test coverage detected
searching dependent graphs…