Renovate Bot
e18d664d5a
Some checks failed
Dev Version / Release (push) Has been cancelled
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | golang.org/x/crypto | require | minor | `v0.14.0` -> `v0.27.0` | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yMS4yIiwidXBkYXRlZEluVmVyIjoiMzguMjEuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==--> Reviewed-on: #6 Co-authored-by: Renovate Bot <renovate@keks.cloud> Co-committed-by: Renovate Bot <renovate@keks.cloud>
29 lines
781 B
Go
29 lines
781 B
Go
// Copyright 2019 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
|
|
|
|
package unix
|
|
|
|
// Set adds fd to the set fds.
|
|
func (fds *FdSet) Set(fd int) {
|
|
fds.Bits[fd/NFDBITS] |= (1 << (uintptr(fd) % NFDBITS))
|
|
}
|
|
|
|
// Clear removes fd from the set fds.
|
|
func (fds *FdSet) Clear(fd int) {
|
|
fds.Bits[fd/NFDBITS] &^= (1 << (uintptr(fd) % NFDBITS))
|
|
}
|
|
|
|
// IsSet returns whether fd is in the set fds.
|
|
func (fds *FdSet) IsSet(fd int) bool {
|
|
return fds.Bits[fd/NFDBITS]&(1<<(uintptr(fd)%NFDBITS)) != 0
|
|
}
|
|
|
|
// Zero clears the set fds.
|
|
func (fds *FdSet) Zero() {
|
|
for i := range fds.Bits {
|
|
fds.Bits[i] = 0
|
|
}
|
|
}
|