TimeEncoderOfLayout returns TimeEncoder which serializes a time.Time using given layout.
(layout string)
| 162 | // TimeEncoderOfLayout returns TimeEncoder which serializes a time.Time using |
| 163 | // given layout. |
| 164 | func TimeEncoderOfLayout(layout string) TimeEncoder { |
| 165 | return func(t time.Time, enc PrimitiveArrayEncoder) { |
| 166 | encodeTimeLayout(t, layout, enc) |
| 167 | } |
| 168 | } |
| 169 | |
| 170 | // UnmarshalText unmarshals text to a TimeEncoder. |
| 171 | // "rfc3339nano" and "RFC3339Nano" are unmarshaled to RFC3339NanoTimeEncoder. |
no test coverage detected