mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-07-18 02:01:29 +00:00
Fix go lint error and add golint checks to a pre-commit hook
This commit is contained in:
@@ -40,6 +40,7 @@ type Var struct {
|
||||
FieldRef corev1.ObjectFieldSelector `json:"fieldref,omitempty" yaml:"objref,omitempty"`
|
||||
}
|
||||
|
||||
// Defaulting sets reference to field used by default.
|
||||
func (v *Var) Defaulting() {
|
||||
if (corev1.ObjectFieldSelector{}) == v.FieldRef {
|
||||
v.FieldRef = corev1.ObjectFieldSelector{FieldPath: "metadata.name"}
|
||||
|
||||
Reference in New Issue
Block a user