EncoderDateKeys sets a list of globs that define the keys whose values should be encoded as a date. Every key that matches any of the globs and have a numeric value are encoded as a date, which means that a comment is added with the human-friendly date.
(g []glob.Glob)
| 64 | // have a numeric value are encoded as a date, which means that a comment is |
| 65 | // added with the human-friendly date. |
| 66 | func EncoderDateKeys(g []glob.Glob) EncoderOption { |
| 67 | return func(e *Encoder) { e.dateKeys = g } |
| 68 | } |
| 69 | |
| 70 | // EncoderIndent sets the indentation size used while encoding the YAML. |
| 71 | func EncoderIndent(i int) EncoderOption { |
no outgoing calls