apimachinery: k8s.io/apimachinery/pkg/api/equality Index | Files

package equality

import "k8s.io/apimachinery/pkg/api/equality"

Index

Package Files

semantic.go

Variables

var Semantic = conversion.EqualitiesOrDie(
    func(a, b resource.Quantity) bool {

        return a.Cmp(b) == 0
    },
    func(a, b metav1.MicroTime) bool {
        return a.UTC() == b.UTC()
    },
    func(a, b metav1.Time) bool {
        return a.UTC() == b.UTC()
    },
    func(a, b labels.Selector) bool {
        return a.String() == b.String()
    },
    func(a, b fields.Selector) bool {
        return a.String() == b.String()
    },
)

Semantic can do semantic deep equality checks for api objects. Example: apiequality.Semantic.DeepEqual(aPod, aPodWithNonNilButEmptyMaps) == true

Package equality imports 5 packages (graph) and is imported by 592 packages. Updated 2018-03-23. Refresh now. Tools for package owners.