pelletier / go-toml

Go library for the TOML file format
https://github.com/pelletier/go-toml
Other
1.69k stars 206 forks source link

LocalDate vs time.Time in toml.Unmarshal #787

Closed bep closed 2 years ago

bep commented 2 years ago

We have had some bug reports in Hugo after the v2 upgrade because of the new local date/datetime types. I probably should have seen these coming and fixed them sooner, as they are fixable on our side. But after doing some work on this (see https://github.com/gohugoio/hugo/pull/9981) I get a nagging feeling that it would possibly be good to have an option or two re. dates in go-toml's Decoder:

What would be nice here would be to have Decoder options for

The workaround I'm looking at on the Hugo side now, is to walk the map[string]interface{} and do a conversion, but I have a nagging suspicion that this may be a concern from more people out there.

/cc @jmooring

bep commented 2 years ago

I'm closing this, I need to think a little.