(t time.Time, layout string, enc PrimitiveArrayEncoder)
| 121 | } |
| 122 | |
| 123 | func encodeTimeLayout(t time.Time, layout string, enc PrimitiveArrayEncoder) { |
| 124 | type appendTimeEncoder interface { |
| 125 | AppendTimeLayout(time.Time, string) |
| 126 | } |
| 127 | |
| 128 | if enc, ok := enc.(appendTimeEncoder); ok { |
| 129 | enc.AppendTimeLayout(t, layout) |
| 130 | return |
| 131 | } |
| 132 | |
| 133 | enc.AppendString(t.Format(layout)) |
| 134 | } |
| 135 | |
| 136 | // ISO8601TimeEncoder serializes a time.Time to an ISO8601-formatted string |
| 137 | // with millisecond precision. |
no test coverage detected