Skip to content

Commit 047d49f

Browse files
authored
fix(json): update build constraints for Go version comp (#6064)
Signed-off-by: Dwi Siswanto <[email protected]>
1 parent cbd90df commit 047d49f

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

pkg/utils/json/doc.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Package json provides fast JSON encoding and decoding functionality.
22
//
33
// On supported platforms; Linux, Darwin, or Windows on amd64, or on arm64 with
4-
// Go 1.20 or later, the package uses the high-performance [sonic] library. On
5-
// any other systems, it gracefully falls back to using the [go-json]
4+
// Go >= 1.20 and <= 1.23, the package uses the high-performance [sonic] library.
5+
// On any other systems, it gracefully falls back to using the [go-json]
66
// implementation.
77
//
88
// This package acts as a wrapper around the underlying JSON APIs, offering

pkg/utils/json/json.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
//go:build (linux || darwin || windows) && (amd64 || arm64)
1+
//go:build !go1.24 && (linux || darwin || windows) && (amd64 || arm64)
2+
// +build !go1.24
23
// +build linux darwin windows
34
// +build amd64 arm64
45

pkg/utils/json/json_fallback.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
//go:build !((linux || darwin || windows) && (amd64 || arm64))
2-
// +build !linux,!darwin,!windows !amd64,!arm64
1+
//go:build go1.24 || !(linux || darwin || windows) || !(amd64 || arm64)
2+
// +build go1.24 !linux,!darwin,!windows !amd64,!arm64
33

44
package json
55

0 commit comments

Comments
 (0)