mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-12 17:34:21 +00:00
Convert inventory transformer to plugin, reduce k8sdeps.
This commit is contained in:
25
pkg/types/garbagepolicy_string.go
Normal file
25
pkg/types/garbagepolicy_string.go
Normal file
@@ -0,0 +1,25 @@
|
||||
// Code generated by "stringer -type=GarbagePolicy"; DO NOT EDIT.
|
||||
|
||||
package types
|
||||
|
||||
import "strconv"
|
||||
|
||||
func _() {
|
||||
// An "invalid array index" compiler error signifies that the constant values have changed.
|
||||
// Re-run the stringer command to generate them again.
|
||||
var x [1]struct{}
|
||||
_ = x[GarbageIgnore-1]
|
||||
_ = x[GarbageCollect-2]
|
||||
}
|
||||
|
||||
const _GarbagePolicy_name = "GarbageIgnoreGarbageCollect"
|
||||
|
||||
var _GarbagePolicy_index = [...]uint8{0, 13, 27}
|
||||
|
||||
func (i GarbagePolicy) String() string {
|
||||
i -= 1
|
||||
if i < 0 || i >= GarbagePolicy(len(_GarbagePolicy_index)-1) {
|
||||
return "GarbagePolicy(" + strconv.FormatInt(int64(i+1), 10) + ")"
|
||||
}
|
||||
return _GarbagePolicy_name[_GarbagePolicy_index[i]:_GarbagePolicy_index[i+1]]
|
||||
}
|
||||
@@ -146,11 +146,11 @@ type Kustomization struct {
|
||||
Inventory *Inventory `json:"inventory,omitempty" yaml:"inventory:omitempty"`
|
||||
}
|
||||
|
||||
//go:generate stringer -type=GarbagePolicy
|
||||
type GarbagePolicy int
|
||||
|
||||
const (
|
||||
GarbageUnknown GarbagePolicy = iota
|
||||
GarbageIgnore
|
||||
GarbageIgnore GarbagePolicy = iota + 1
|
||||
GarbageCollect
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user