diff --git a/pkg/utils/json/doc.go b/pkg/utils/json/doc.go index 35b612b76..b3eb7d24a 100644 --- a/pkg/utils/json/doc.go +++ b/pkg/utils/json/doc.go @@ -1,8 +1,8 @@ // Package json provides fast JSON encoding and decoding functionality. // // On supported platforms; Linux, Darwin, or Windows on amd64, or on arm64 with -// Go 1.20 or later, the package uses the high-performance [sonic] library. On -// any other systems, it gracefully falls back to using the [go-json] +// Go >= 1.20 and <= 1.23, the package uses the high-performance [sonic] library. +// On any other systems, it gracefully falls back to using the [go-json] // implementation. // // This package acts as a wrapper around the underlying JSON APIs, offering diff --git a/pkg/utils/json/json.go b/pkg/utils/json/json.go index 054640695..c9d9e39ab 100644 --- a/pkg/utils/json/json.go +++ b/pkg/utils/json/json.go @@ -1,4 +1,5 @@ -//go:build (linux || darwin || windows) && (amd64 || arm64) +//go:build !go1.24 && (linux || darwin || windows) && (amd64 || arm64) +// +build !go1.24 // +build linux darwin windows // +build amd64 arm64 diff --git a/pkg/utils/json/json_fallback.go b/pkg/utils/json/json_fallback.go index 12cf71ad3..495cbaeda 100644 --- a/pkg/utils/json/json_fallback.go +++ b/pkg/utils/json/json_fallback.go @@ -1,5 +1,5 @@ -//go:build !((linux || darwin || windows) && (amd64 || arm64)) -// +build !linux,!darwin,!windows !amd64,!arm64 +//go:build go1.24 || !(linux || darwin || windows) || !(amd64 || arm64) +// +build go1.24 !linux,!darwin,!windows !amd64,!arm64 package json