You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get the error:
Error decoding TOML: Near line 1 (last key parsed ''): expected a top-level item to end with a newline, comment, or EOF, but got 't' instead
It looks like this is a limitation of the Go time package, which looks just at Z (and T).
RFC 3339 says:
NOTE: Per [ABNF] and ISO8601, the "T" and "Z" characters in this
syntax may alternatively be lower case "t" or "z" respectively.
This date/time format may be used in some environments or contexts
that distinguish between the upper- and lower-case letters 'A'-'Z'
and 'a'-'z' (e.g. XML). Specifications that use this format in
such environments MAY further limit the date/time syntax so that
the letters 'T' and 'Z' used in the date/time syntax must always
be upper case. Applications that generate this format SHOULD use
upper case letters.
So it doesn't strictly disallow limiting to just an upper-case "Z" or "T" and implementations MAY limit this.
I'm not super-pedantic about allowing a t or z, but working around the Go time package parsing is probably a bit too much; I found this open issue for it, so ideally that should really be fixed first.
Using the following input:
I get the error:
Error decoding TOML: Near line 1 (last key parsed ''): expected a top-level item to end with a newline, comment, or EOF, but got 't' instead
The expected output is something like:
According to RFC 3339 and the toml ABNF, the "T" and "Z" part of a date/time value are case insensitive and can therefore be lower case characters.
The text was updated successfully, but these errors were encountered: