manually sync with k8s.io/kubernetest at 17375fc59fff39135af63bd1750bb07c36ef873b, k8s.io/apimachinery at d90aa2c8531f13b0ca734845934c10dcb6a56ca7

This commit is contained in:
Chao Xu
2017-02-23 12:23:54 -08:00
parent 5fbce75e01
commit 088dc4a30d
304 changed files with 37541 additions and 6673 deletions

View File

@@ -42,6 +42,7 @@ const (
NodeWildcard
NodeRecursive
NodeUnion
NodeBool
)
var NodeTypeName = map[NodeType]string{
@@ -56,6 +57,7 @@ var NodeTypeName = map[NodeType]string{
NodeWildcard: "NodeWildcard",
NodeRecursive: "NodeRecursive",
NodeUnion: "NodeUnion",
NodeBool: "NodeBool",
}
type Node interface {
@@ -237,3 +239,17 @@ func newUnion(nodes []*ListNode) *UnionNode {
func (u *UnionNode) String() string {
return fmt.Sprintf("%s", u.Type())
}
// BoolNode holds bool value
type BoolNode struct {
NodeType
Value bool
}
func newBool(value bool) *BoolNode {
return &BoolNode{NodeType: NodeBool, Value: value}
}
func (b *BoolNode) String() string {
return fmt.Sprintf("%s: %t", b.Type(), b.Value)
}