Merge pull request #54056 from yuexiao-wang/modify-comment

Automatic merge from submit-queue (batch tested with PRs 51401, 54056, 54977, 55017, 55052). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix example and comments for kubectl convert

Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>

**What this PR does / why we need it**:
There are some erros in example and comments in convert

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Release note**:
```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2017-11-03 12:07:56 -07:00 committed by GitHub
commit 7e853132b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,7 +52,7 @@ var (
kubectl convert -f pod.yaml
# Convert the live state of the resource specified by 'pod.yaml' to the latest version
# and print to stdout in json format.
# and print to stdout in JSON format.
kubectl convert -f pod.yaml --local -o json
# Convert all files under current directory to latest version and create them all.
@ -204,7 +204,7 @@ func (o *ConvertOptions) RunConvert() error {
return o.printer.PrintObj(objects, o.out)
}
// ObjectListToVersionedObject receives a list of api objects and a group version
// objectListToVersionedObject receives a list of api objects and a group version
// and squashes the list's items into a single versioned runtime.Object.
func objectListToVersionedObject(objects []runtime.Object, version schema.GroupVersion) (runtime.Object, error) {
objectList := &api.List{Items: objects}
@ -215,7 +215,7 @@ func objectListToVersionedObject(objects []runtime.Object, version schema.GroupV
return converted, nil
}
// AsVersionedObject converts a list of infos into a single object - either a List containing
// asVersionedObject converts a list of infos into a single object - either a List containing
// the objects as children, or if only a single Object is present, as that object. The provided
// version will be preferred as the conversion target, but the Object's mapping version will be
// used if that version is not present.
@ -248,7 +248,7 @@ func asVersionedObject(infos []*resource.Info, forceList bool, version schema.Gr
return object, nil
}
// AsVersionedObjects converts a list of infos into versioned objects. The provided
// asVersionedObjects converts a list of infos into versioned objects. The provided
// version will be preferred as the conversion target, but the Object's mapping version will be
// used if that version is not present.
func asVersionedObjects(infos []*resource.Info, version schema.GroupVersion, encoder runtime.Encoder) ([]runtime.Object, error) {