From 255b06c8abda0346aa7cd8d30fdbbe771fe029ec Mon Sep 17 00:00:00 2001 From: Romain Marcadier Date: Wed, 13 Dec 2023 17:38:32 +0100 Subject: [PATCH] avoid collision between unsupported platform & unsupported go --- waf_unsupported_target.go | 2 +- waf_unsupported_target_test.go | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/waf_unsupported_target.go b/waf_unsupported_target.go index d8da6e9b..3e56304e 100644 --- a/waf_unsupported_target.go +++ b/waf_unsupported_target.go @@ -5,7 +5,7 @@ // Unsupported target OS or architecture // Unsupported OS Unsupported Arch -//go:build (!linux && !darwin) || (!amd64 && !arm64) +//go:build ((!linux && !darwin) || (!amd64 && !arm64)) && !go1.22 package waf diff --git a/waf_unsupported_target_test.go b/waf_unsupported_target_test.go index 78f8eda5..39a5d927 100644 --- a/waf_unsupported_target_test.go +++ b/waf_unsupported_target_test.go @@ -3,15 +3,16 @@ // This product includes software developed at Datadog (https://www.datadoghq.com/). // Copyright 2016-present Datadog, Inc. -//go:build (!linux && !darwin) || (!amd64 && !arm64) +//go:build ((!linux && !darwin) || (!amd64 && !arm64)) && !go1.22 package waf_test import ( - waf "github.com/DataDog/go-libddwaf/v2" - "github.com/stretchr/testify/require" "runtime" "testing" + + waf "github.com/DataDog/go-libddwaf/v2" + "github.com/stretchr/testify/require" ) func TestSupportsTarget(t *testing.T) {