Merge pull request #48686 from jianglingxia/jlx71015

Automatic merge from submit-queue

amend the comment

**What this PR does / why we need it**:

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```NONE
This commit is contained in:
Kubernetes Submit Queue
2017-07-18 09:13:57 -07:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@@ -285,7 +285,7 @@ func ListResource(r rest.Lister, rw rest.Watcher, scope RequestScope, forceWatch
}
// Watches for single objects are routed to this function.
// Treat a /name parameter the same as a field selector entry.
// Treat a name parameter the same as a field selector entry.
hasName := true
_, name, err := scope.Namer.Name(req)
if err != nil {

View File

@@ -1150,7 +1150,7 @@ func (e *Store) Watch(ctx genericapirequest.Context, options *metainternalversio
return e.WatchPredicate(ctx, predicate, resourceVersion)
}
// WatchPredicate starts a watch for the items that m matches.
// WatchPredicate starts a watch for the items that matches.
func (e *Store) WatchPredicate(ctx genericapirequest.Context, p storage.SelectionPredicate, resourceVersion string) (watch.Interface, error) {
if name, ok := p.MatchesSingle(); ok {
if key, err := e.KeyFunc(ctx, name); err == nil {
@@ -1276,7 +1276,7 @@ func (e *Store) CompleteWithOptions(options *generic.StoreOptions) error {
return err
}
// Resource prefix must come from the underlying factory
// ResourcePrefix must come from the underlying factory
prefix := opts.ResourcePrefix
if !strings.HasPrefix(prefix, "/") {
prefix = "/" + prefix