Skip to content

Commit

Permalink
fix(json): update build constraints for Go version comp (#6064)
Browse files Browse the repository at this point in the history
Signed-off-by: Dwi Siswanto <git@dw1.io>
  • Loading branch information
dwisiswant0 authored Feb 21, 2025
1 parent cbd90df commit 047d49f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pkg/utils/json/doc.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 2 additions & 1 deletion pkg/utils/json/json.go
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 2 additions & 2 deletions pkg/utils/json/json_fallback.go
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit 047d49f

Please sign in to comment.