mirror of
https://github.com/opencontainers/runc.git
synced 2025-10-06 07:56:55 +08:00
move from Godeps to vndr
This uses the standard go vendor location instead of old Godeps location. Also remove usage of symlink GOPATH. Since our README mentions that you should build it inside GOPATH, i think its a reasonable to assume that you dont need to create a tmp GOPATH. Signed-off-by: Daniel Dao <dqminh89@gmail.com>
This commit is contained in:

committed by
Daniel Dao

parent
bd2f9c52cd
commit
993cbf9db0
53
vendor/github.com/vishvananda/netlink/protinfo.go
generated
vendored
Normal file
53
vendor/github.com/vishvananda/netlink/protinfo.go
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
package netlink
|
||||
|
||||
import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
// Protinfo represents bridge flags from netlink.
|
||||
type Protinfo struct {
|
||||
Hairpin bool
|
||||
Guard bool
|
||||
FastLeave bool
|
||||
RootBlock bool
|
||||
Learning bool
|
||||
Flood bool
|
||||
}
|
||||
|
||||
// String returns a list of enabled flags
|
||||
func (prot *Protinfo) String() string {
|
||||
var boolStrings []string
|
||||
if prot.Hairpin {
|
||||
boolStrings = append(boolStrings, "Hairpin")
|
||||
}
|
||||
if prot.Guard {
|
||||
boolStrings = append(boolStrings, "Guard")
|
||||
}
|
||||
if prot.FastLeave {
|
||||
boolStrings = append(boolStrings, "FastLeave")
|
||||
}
|
||||
if prot.RootBlock {
|
||||
boolStrings = append(boolStrings, "RootBlock")
|
||||
}
|
||||
if prot.Learning {
|
||||
boolStrings = append(boolStrings, "Learning")
|
||||
}
|
||||
if prot.Flood {
|
||||
boolStrings = append(boolStrings, "Flood")
|
||||
}
|
||||
return strings.Join(boolStrings, " ")
|
||||
}
|
||||
|
||||
func boolToByte(x bool) []byte {
|
||||
if x {
|
||||
return []byte{1}
|
||||
}
|
||||
return []byte{0}
|
||||
}
|
||||
|
||||
func byteToBool(x byte) bool {
|
||||
if uint8(x) != 0 {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
Reference in New Issue
Block a user