Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In order to protect users of prebid-server that don't use CGO, add build flag #4058

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build cgo

package devicedetection

import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build cgo

package devicedetection

import (
Expand Down
2 changes: 2 additions & 0 deletions modules/fiftyonedegrees/devicedetection/account_validator.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build cgo

package devicedetection

import "slices"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build cgo

package devicedetection

import (
Expand Down
2 changes: 2 additions & 0 deletions modules/fiftyonedegrees/devicedetection/config.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build cgo

package devicedetection

import (
Expand Down
2 changes: 2 additions & 0 deletions modules/fiftyonedegrees/devicedetection/config_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build cgo

package devicedetection

import (
Expand Down
2 changes: 2 additions & 0 deletions modules/fiftyonedegrees/devicedetection/context.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build cgo

package devicedetection

// Context keys for device detection
Expand Down
2 changes: 2 additions & 0 deletions modules/fiftyonedegrees/devicedetection/device_detector.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build cgo

package devicedetection

import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build cgo

package devicedetection

import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build cgo

package devicedetection

import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build cgo

package devicedetection

import (
Expand Down
2 changes: 2 additions & 0 deletions modules/fiftyonedegrees/devicedetection/evidence_extractor.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build cgo

package devicedetection

import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build cgo

package devicedetection

import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build cgo

package devicedetection

import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build cgo

package devicedetection

import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build cgo

package devicedetection

import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build cgo

package devicedetection

import (
Expand Down
2 changes: 2 additions & 0 deletions modules/fiftyonedegrees/devicedetection/models.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build cgo

package devicedetection

// Prefixes in literal format
Expand Down
2 changes: 2 additions & 0 deletions modules/fiftyonedegrees/devicedetection/models_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build cgo

package devicedetection

import (
Expand Down
2 changes: 2 additions & 0 deletions modules/fiftyonedegrees/devicedetection/module.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build cgo

package devicedetection

import (
Expand Down
2 changes: 2 additions & 0 deletions modules/fiftyonedegrees/devicedetection/module_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build cgo

package devicedetection

import (
Expand Down
13 changes: 13 additions & 0 deletions modules/fiftyonedegrees/devicedetection/no_cgo.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//go:build !cgo

package devicedetection

import (
"encoding/json"

"github.com/prebid/prebid-server/v2/modules/moduledeps"
scr-oath marked this conversation as resolved.
Show resolved Hide resolved
)

func Builder(rawConfig json.RawMessage, _ moduledeps.ModuleDeps) (interface{}, error) {
panic("Not implemented when CGO_ENABLED=0")
scr-oath marked this conversation as resolved.
Show resolved Hide resolved
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build cgo

package devicedetection

import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build cgo

package devicedetection

import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build cgo

package devicedetection

import (
Expand Down
Loading