(v time.Time, column int)
| 837 | } |
| 838 | |
| 839 | func (e *Encoder) encodeTime(v time.Time, column int) *ast.StringNode { |
| 840 | value := v.Format(time.RFC3339Nano) |
| 841 | if e.isJSONStyle { |
| 842 | value = strconv.Quote(value) |
| 843 | } |
| 844 | return ast.String(token.New(value, value, e.pos(column))) |
| 845 | } |
| 846 | |
| 847 | func (e *Encoder) encodeDuration(v time.Duration, column int) *ast.StringNode { |
| 848 | value := v.String() |
no test coverage detected