Update opencontainers/selinux to v1.8.2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
This commit is contained in:
@@ -2,10 +2,9 @@
|
||||
|
||||
*Go language library to map between non-negative integers and boolean values*
|
||||
|
||||
[](https://github.com/willf/bitset/actions?query=workflow%3ATest)
|
||||
[](https://coveralls.io/github/willf/bitset?branch=master)
|
||||
[](https://github.com/willf/bitset/actions?query=workflow%3ATest)
|
||||
[](https://goreportcard.com/report/github.com/willf/bitset)
|
||||
[](https://pkg.go.dev/github.com/willf/bitset?tab=doc)
|
||||
[](https://pkg.go.dev/github.com/bits-and-blooms/bitset?tab=doc)
|
||||
|
||||
|
||||
## Description
|
||||
@@ -30,7 +29,7 @@ import (
|
||||
"fmt"
|
||||
"math/rand"
|
||||
|
||||
"github.com/willf/bitset"
|
||||
"github.com/bits-and-blooms/bitset"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -63,7 +62,7 @@ func main() {
|
||||
|
||||
As an alternative to BitSets, one should check out the 'big' package, which provides a (less set-theoretical) view of bitsets.
|
||||
|
||||
Package documentation is at: https://pkg.go.dev/github.com/willf/bitset?tab=doc
|
||||
Package documentation is at: https://pkg.go.dev/github.com/bits-and-blooms/bitset?tab=doc
|
||||
|
||||
## Memory Usage
|
||||
|
||||
@@ -78,7 +77,7 @@ It is possible that a later version will match the `math/bits` return signature
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
go get github.com/willf/bitset
|
||||
go get github.com/bits-and-blooms/bitset
|
||||
```
|
||||
|
||||
## Contributing
|
||||
@@ -209,6 +209,27 @@ func (b *BitSet) Flip(i uint) *BitSet {
|
||||
return b
|
||||
}
|
||||
|
||||
// FlipRange bit in [start, end).
|
||||
// If end>= Cap(), this function will panic.
|
||||
// Warning: using a very large value for 'end'
|
||||
// may lead to a memory shortage and a panic: the caller is responsible
|
||||
// for providing sensible parameters in line with their memory capacity.
|
||||
func (b *BitSet) FlipRange(start, end uint) *BitSet {
|
||||
if start >= end {
|
||||
return b
|
||||
}
|
||||
|
||||
b.extendSetMaybe(end - 1)
|
||||
var startWord uint = start >> log2WordSize
|
||||
var endWord uint = end >> log2WordSize
|
||||
b.set[startWord] ^= ^(^uint64(0) << (start & (wordSize - 1)))
|
||||
for i := startWord; i < endWord; i++ {
|
||||
b.set[i] = ^b.set[i]
|
||||
}
|
||||
b.set[endWord] ^= ^uint64(0) >> (-end & (wordSize - 1))
|
||||
return b
|
||||
}
|
||||
|
||||
// Shrink shrinks BitSet so that the provided value is the last possible
|
||||
// set value. It clears all bits > the provided index and reduces the size
|
||||
// and length of the set.
|
||||
@@ -519,7 +540,7 @@ func (b *BitSet) Copy(c *BitSet) (count uint) {
|
||||
}
|
||||
|
||||
// Count (number of set bits).
|
||||
// Also known as "popcount" or "popularity count".
|
||||
// Also known as "popcount" or "population count".
|
||||
func (b *BitSet) Count() uint {
|
||||
if b != nil && b.set != nil {
|
||||
return uint(popcntSlice(b.set))
|
||||
3
vendor/github.com/bits-and-blooms/bitset/go.mod
generated
vendored
Normal file
3
vendor/github.com/bits-and-blooms/bitset/go.mod
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
module github.com/bits-and-blooms/bitset
|
||||
|
||||
go 1.14
|
||||
2
vendor/github.com/opencontainers/selinux/go-selinux/selinux_linux.go
generated
vendored
2
vendor/github.com/opencontainers/selinux/go-selinux/selinux_linux.go
generated
vendored
@@ -16,9 +16,9 @@ import (
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/bits-and-blooms/bitset"
|
||||
"github.com/opencontainers/selinux/pkg/pwalk"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/willf/bitset"
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
|
||||
3
vendor/github.com/willf/bitset/go.mod
generated
vendored
3
vendor/github.com/willf/bitset/go.mod
generated
vendored
@@ -1,3 +0,0 @@
|
||||
module github.com/willf/bitset
|
||||
|
||||
go 1.14
|
||||
Reference in New Issue
Block a user