mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Since everything fits inside an int64, we avoid using crypto/rand.Int, which can allocate and uses the much more complex big.Int. PiperOrigin-RevId: 580050587
27 lines
471 B
Python
27 lines
471 B
Python
load("//tools:defs.bzl", "go_library", "go_test")
|
|
|
|
package(
|
|
default_applicable_licenses = ["//:license"],
|
|
licenses = ["notice"],
|
|
)
|
|
|
|
go_library(
|
|
name = "rand",
|
|
srcs = [
|
|
"rand.go",
|
|
"rand_linux.go",
|
|
"rng.go",
|
|
],
|
|
visibility = ["//:sandbox"],
|
|
deps = [
|
|
"//pkg/sync",
|
|
"@org_golang_x_sys//unix:go_default_library",
|
|
],
|
|
)
|
|
|
|
go_test(
|
|
name = "rand_test",
|
|
srcs = ["rng_test.go"],
|
|
library = ":rand",
|
|
)
|