From 3025b3097a7a026f45c217ce94042c2303c842e0 Mon Sep 17 00:00:00 2001 From: aaa <1693291525@qq.com> Date: Mon, 3 Jun 2019 06:05:35 -0400 Subject: [PATCH] Fixed some minor errors in openapi update pull request --- pkg/kubectl/apply/parse/openapi.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/kubectl/apply/parse/openapi.go b/pkg/kubectl/apply/parse/openapi.go index a55594de4b1..5afebaecf00 100644 --- a/pkg/kubectl/apply/parse/openapi.go +++ b/pkg/kubectl/apply/parse/openapi.go @@ -147,7 +147,7 @@ type mapSchemaVisitor struct { Result *proto.Map } -// MergeMap implements openapi +// VisitMap implements openapi func (v *mapSchemaVisitor) VisitMap(result *proto.Map) { v.Result = result v.Kind = "map" @@ -173,7 +173,7 @@ func (v *arraySchemaVisitor) VisitArray(result *proto.Array) { v.Err = copySubElementPatchStrategy(result.Path.String(), result.GetExtensions(), result.SubType.GetExtensions()) } -// copyPatchStrategy copies the strategies to subelements to the subtype +// copySubElementPatchStrategy copies the strategies to subelements to the subtype // e.g. PodTemplate.Volumes is a []Volume with "x-kubernetes-patch-strategy": "merge,retainKeys" // the "retainKeys" strategy applies to merging Volumes, and must be copied to the sub element func copySubElementPatchStrategy(field string, from, to map[string]interface{}) error { @@ -199,7 +199,7 @@ func copySubElementPatchStrategy(field string, from, to map[string]interface{}) return nil } -// MergePrimitive implements openapi +// VisitReference implements openapi func (v *arraySchemaVisitor) VisitReference(reference proto.Reference) { reference.SubSchema().Accept(v) if v.Err == nil { @@ -212,7 +212,7 @@ type primitiveSchemaVisitor struct { Result *proto.Primitive } -// MergePrimitive implements openapi +// VisitPrimitive implements openapi func (v *primitiveSchemaVisitor) VisitPrimitive(result *proto.Primitive) { v.Result = result v.Kind = "primitive"