diff --git a/modules/fiftyonedegrees/devicedetection/account_info_extractor.go b/modules/fiftyonedegrees/devicedetection/account_info_extractor.go index 2a5168cfe0..3961ec1137 100644 --- a/modules/fiftyonedegrees/devicedetection/account_info_extractor.go +++ b/modules/fiftyonedegrees/devicedetection/account_info_extractor.go @@ -1,3 +1,5 @@ +//go:build cgo + package devicedetection import ( diff --git a/modules/fiftyonedegrees/devicedetection/account_info_extractor_test.go b/modules/fiftyonedegrees/devicedetection/account_info_extractor_test.go index 2d32f7915b..76cb543c01 100644 --- a/modules/fiftyonedegrees/devicedetection/account_info_extractor_test.go +++ b/modules/fiftyonedegrees/devicedetection/account_info_extractor_test.go @@ -1,3 +1,5 @@ +//go:build cgo + package devicedetection import ( diff --git a/modules/fiftyonedegrees/devicedetection/account_validator.go b/modules/fiftyonedegrees/devicedetection/account_validator.go index fdff92531a..169850e551 100644 --- a/modules/fiftyonedegrees/devicedetection/account_validator.go +++ b/modules/fiftyonedegrees/devicedetection/account_validator.go @@ -1,3 +1,5 @@ +//go:build cgo + package devicedetection import "slices" diff --git a/modules/fiftyonedegrees/devicedetection/account_validator_test.go b/modules/fiftyonedegrees/devicedetection/account_validator_test.go index 25f99e3b79..b3c943bf5a 100644 --- a/modules/fiftyonedegrees/devicedetection/account_validator_test.go +++ b/modules/fiftyonedegrees/devicedetection/account_validator_test.go @@ -1,3 +1,5 @@ +//go:build cgo + package devicedetection import ( diff --git a/modules/fiftyonedegrees/devicedetection/config.go b/modules/fiftyonedegrees/devicedetection/config.go index a5c302bcff..bcf61746d2 100644 --- a/modules/fiftyonedegrees/devicedetection/config.go +++ b/modules/fiftyonedegrees/devicedetection/config.go @@ -1,3 +1,5 @@ +//go:build cgo + package devicedetection import ( diff --git a/modules/fiftyonedegrees/devicedetection/config_test.go b/modules/fiftyonedegrees/devicedetection/config_test.go index e2478d82b7..9775eb7a10 100644 --- a/modules/fiftyonedegrees/devicedetection/config_test.go +++ b/modules/fiftyonedegrees/devicedetection/config_test.go @@ -1,3 +1,5 @@ +//go:build cgo + package devicedetection import ( diff --git a/modules/fiftyonedegrees/devicedetection/context.go b/modules/fiftyonedegrees/devicedetection/context.go index 3c10dd2f39..b16495ef1f 100644 --- a/modules/fiftyonedegrees/devicedetection/context.go +++ b/modules/fiftyonedegrees/devicedetection/context.go @@ -1,3 +1,5 @@ +//go:build cgo + package devicedetection // Context keys for device detection diff --git a/modules/fiftyonedegrees/devicedetection/device_detector.go b/modules/fiftyonedegrees/devicedetection/device_detector.go index 8369d343d3..39f086ea16 100644 --- a/modules/fiftyonedegrees/devicedetection/device_detector.go +++ b/modules/fiftyonedegrees/devicedetection/device_detector.go @@ -1,3 +1,5 @@ +//go:build cgo + package devicedetection import ( diff --git a/modules/fiftyonedegrees/devicedetection/device_detector_test.go b/modules/fiftyonedegrees/devicedetection/device_detector_test.go index 84d6ab28cc..c113aec7ac 100644 --- a/modules/fiftyonedegrees/devicedetection/device_detector_test.go +++ b/modules/fiftyonedegrees/devicedetection/device_detector_test.go @@ -1,3 +1,5 @@ +//go:build cgo + package devicedetection import ( diff --git a/modules/fiftyonedegrees/devicedetection/device_info_extractor.go b/modules/fiftyonedegrees/devicedetection/device_info_extractor.go index 1c913e2169..c1d185b860 100644 --- a/modules/fiftyonedegrees/devicedetection/device_info_extractor.go +++ b/modules/fiftyonedegrees/devicedetection/device_info_extractor.go @@ -1,3 +1,5 @@ +//go:build cgo + package devicedetection import ( diff --git a/modules/fiftyonedegrees/devicedetection/device_info_extractor_test.go b/modules/fiftyonedegrees/devicedetection/device_info_extractor_test.go index 197e392860..23bee8a5d5 100644 --- a/modules/fiftyonedegrees/devicedetection/device_info_extractor_test.go +++ b/modules/fiftyonedegrees/devicedetection/device_info_extractor_test.go @@ -1,3 +1,5 @@ +//go:build cgo + package devicedetection import ( diff --git a/modules/fiftyonedegrees/devicedetection/evidence_extractor.go b/modules/fiftyonedegrees/devicedetection/evidence_extractor.go index a99a921e75..2a3d36a98b 100644 --- a/modules/fiftyonedegrees/devicedetection/evidence_extractor.go +++ b/modules/fiftyonedegrees/devicedetection/evidence_extractor.go @@ -1,3 +1,5 @@ +//go:build cgo + package devicedetection import ( diff --git a/modules/fiftyonedegrees/devicedetection/evidence_extractor_test.go b/modules/fiftyonedegrees/devicedetection/evidence_extractor_test.go index 6b2f9b3ea8..7dc4fb9790 100644 --- a/modules/fiftyonedegrees/devicedetection/evidence_extractor_test.go +++ b/modules/fiftyonedegrees/devicedetection/evidence_extractor_test.go @@ -1,3 +1,5 @@ +//go:build cgo + package devicedetection import ( diff --git a/modules/fiftyonedegrees/devicedetection/fiftyone_device_types.go b/modules/fiftyonedegrees/devicedetection/fiftyone_device_types.go index 7237698117..2c95bc98e2 100644 --- a/modules/fiftyonedegrees/devicedetection/fiftyone_device_types.go +++ b/modules/fiftyonedegrees/devicedetection/fiftyone_device_types.go @@ -1,3 +1,5 @@ +//go:build cgo + package devicedetection import ( diff --git a/modules/fiftyonedegrees/devicedetection/fiftyone_device_types_test.go b/modules/fiftyonedegrees/devicedetection/fiftyone_device_types_test.go index 5fd0203bac..f8b91678a0 100644 --- a/modules/fiftyonedegrees/devicedetection/fiftyone_device_types_test.go +++ b/modules/fiftyonedegrees/devicedetection/fiftyone_device_types_test.go @@ -1,3 +1,5 @@ +//go:build cgo + package devicedetection import ( diff --git a/modules/fiftyonedegrees/devicedetection/hook_auction_entrypoint.go b/modules/fiftyonedegrees/devicedetection/hook_auction_entrypoint.go index 7597daa8e0..8be51c422d 100644 --- a/modules/fiftyonedegrees/devicedetection/hook_auction_entrypoint.go +++ b/modules/fiftyonedegrees/devicedetection/hook_auction_entrypoint.go @@ -1,3 +1,5 @@ +//go:build cgo + package devicedetection import ( diff --git a/modules/fiftyonedegrees/devicedetection/hook_raw_auction_request.go b/modules/fiftyonedegrees/devicedetection/hook_raw_auction_request.go index 88d0686905..acde532eb5 100644 --- a/modules/fiftyonedegrees/devicedetection/hook_raw_auction_request.go +++ b/modules/fiftyonedegrees/devicedetection/hook_raw_auction_request.go @@ -1,3 +1,5 @@ +//go:build cgo + package devicedetection import ( diff --git a/modules/fiftyonedegrees/devicedetection/models.go b/modules/fiftyonedegrees/devicedetection/models.go index c58daa211f..ffa9887235 100644 --- a/modules/fiftyonedegrees/devicedetection/models.go +++ b/modules/fiftyonedegrees/devicedetection/models.go @@ -1,3 +1,5 @@ +//go:build cgo + package devicedetection // Prefixes in literal format diff --git a/modules/fiftyonedegrees/devicedetection/models_test.go b/modules/fiftyonedegrees/devicedetection/models_test.go index 898f25f414..a2a251f425 100644 --- a/modules/fiftyonedegrees/devicedetection/models_test.go +++ b/modules/fiftyonedegrees/devicedetection/models_test.go @@ -1,3 +1,5 @@ +//go:build cgo + package devicedetection import ( diff --git a/modules/fiftyonedegrees/devicedetection/module.go b/modules/fiftyonedegrees/devicedetection/module.go index 80eed36efd..a4c459a78f 100644 --- a/modules/fiftyonedegrees/devicedetection/module.go +++ b/modules/fiftyonedegrees/devicedetection/module.go @@ -1,3 +1,5 @@ +//go:build cgo + package devicedetection import ( diff --git a/modules/fiftyonedegrees/devicedetection/module_test.go b/modules/fiftyonedegrees/devicedetection/module_test.go index eb59d01359..19595aca4e 100644 --- a/modules/fiftyonedegrees/devicedetection/module_test.go +++ b/modules/fiftyonedegrees/devicedetection/module_test.go @@ -1,3 +1,5 @@ +//go:build cgo + package devicedetection import ( diff --git a/modules/fiftyonedegrees/devicedetection/no_cgo.go b/modules/fiftyonedegrees/devicedetection/no_cgo.go new file mode 100644 index 0000000000..ecdbe31dbd --- /dev/null +++ b/modules/fiftyonedegrees/devicedetection/no_cgo.go @@ -0,0 +1,13 @@ +//go:build !cgo + +package devicedetection + +import ( + "encoding/json" + + "github.com/prebid/prebid-server/v2/modules/moduledeps" +) + +func Builder(rawConfig json.RawMessage, _ moduledeps.ModuleDeps) (interface{}, error) { + panic("Not implemented when CGO_ENABLED=0") +} diff --git a/modules/fiftyonedegrees/devicedetection/request_headers_extractor.go b/modules/fiftyonedegrees/devicedetection/request_headers_extractor.go index 8440886b35..7e36efa295 100644 --- a/modules/fiftyonedegrees/devicedetection/request_headers_extractor.go +++ b/modules/fiftyonedegrees/devicedetection/request_headers_extractor.go @@ -1,3 +1,5 @@ +//go:build cgo + package devicedetection import ( diff --git a/modules/fiftyonedegrees/devicedetection/request_headers_extractor_test.go b/modules/fiftyonedegrees/devicedetection/request_headers_extractor_test.go index 77fbed3a42..8cde22c89d 100644 --- a/modules/fiftyonedegrees/devicedetection/request_headers_extractor_test.go +++ b/modules/fiftyonedegrees/devicedetection/request_headers_extractor_test.go @@ -1,3 +1,5 @@ +//go:build cgo + package devicedetection import ( diff --git a/modules/fiftyonedegrees/devicedetection/sua_payload_extractor.go b/modules/fiftyonedegrees/devicedetection/sua_payload_extractor.go index ab69210449..967ef24d93 100644 --- a/modules/fiftyonedegrees/devicedetection/sua_payload_extractor.go +++ b/modules/fiftyonedegrees/devicedetection/sua_payload_extractor.go @@ -1,3 +1,5 @@ +//go:build cgo + package devicedetection import (