Add LocalTime to interface{} decode support (#567)

Co-authored-by: Thomas Pelletier <thomas@pelletier.codes>
This commit is contained in:
kkHAIKE
2021-07-21 23:50:12 +08:00
committed by GitHub
parent a93b34d984
commit 8be357dfa1
6 changed files with 146 additions and 6 deletions
+7
View File
@@ -806,3 +806,10 @@ func ExampleMarshal() {
// Name = 'go-toml'
// Tags = ['go', 'toml']
}
func TestIssue567(t *testing.T) {
var m map[string]interface{}
err := toml.Unmarshal([]byte("A = 12:08:05"), &m)
require.NoError(t, err)
require.IsType(t, m["A"], toml.LocalTime{})
}