Pin dependency github.com/cilium/ebpf
Use same as opencontainers/runc
This commit is contained in:
19
vendor/github.com/cilium/ebpf/feature.go
generated
vendored
Normal file
19
vendor/github.com/cilium/ebpf/feature.go
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
package ebpf
|
||||
|
||||
import (
|
||||
"sync"
|
||||
)
|
||||
|
||||
type featureTest struct {
|
||||
Fn func() bool
|
||||
|
||||
once sync.Once
|
||||
result bool
|
||||
}
|
||||
|
||||
func (ft *featureTest) Result() bool {
|
||||
ft.once.Do(func() {
|
||||
ft.result = ft.Fn()
|
||||
})
|
||||
return ft.result
|
||||
}
|
Reference in New Issue
Block a user