From ed7815726db4a0eb904d7cae2532cde48348d7ff Mon Sep 17 00:00:00 2001 From: Joe Tsai Date: Tue, 17 Jun 2025 12:34:22 -0700 Subject: encoding/json/v2: report error on time.Duration without explicit format The default representation of a time.Duration is still undecided. In order to keep the future open, report an error on a time.Duration without an explicit format flag provided. Updates #71631 Change-Id: I08248404ff6551723851417c8188a13f53c61937 Reviewed-on: https://go-review.googlesource.com/c/go/+/682455 Auto-Submit: Joseph Tsai Reviewed-by: Dmitri Shuralyov LUCI-TryBot-Result: Go LUCI Reviewed-by: Damien Neil --- src/encoding/json/v2_diff_test.go | 1 + 1 file changed, 1 insertion(+) (limited to 'src/encoding/json/v2_diff_test.go') diff --git a/src/encoding/json/v2_diff_test.go b/src/encoding/json/v2_diff_test.go index 871be49776..7a561732f4 100644 --- a/src/encoding/json/v2_diff_test.go +++ b/src/encoding/json/v2_diff_test.go @@ -1038,6 +1038,7 @@ func TestMergeComposite(t *testing.T) { // // https://go.dev/issue/10275 func TestTimeDurations(t *testing.T) { + t.SkipNow() // TODO(https://go.dev/issue/71631): The default representation of time.Duration is still undecided. for _, json := range jsonPackages { t.Run(path.Join("Marshal", json.Version), func(t *testing.T) { got, err := json.Marshal(time.Minute) -- cgit v1.3