Skip to content

Commit

Permalink
In order to protect users of prebid-server that don't use CGO, add bu…
Browse files Browse the repository at this point in the history
…ild flag.
  • Loading branch information
scr-oath committed Nov 18, 2024
1 parent 63af8af commit f996399
Show file tree
Hide file tree
Showing 25 changed files with 61 additions and 0 deletions.
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"
)

func Builder(rawConfig json.RawMessage, _ moduledeps.ModuleDeps) (interface{}, error) {
panic("Not implemented when CGO_ENABLED=0")
}
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

0 comments on commit f996399

Please sign in to comment.