Kubernetes Submit Queue
a69752c81f
Merge pull request #31944 from m1093782566/m109-master-fix-found
Automatic merge from submit-queue
[Pet Set] Clean up code
<!-- Thanks for sending a pull request! Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->
**What this PR does / why we need it**:
Clean code of petset, from:
```
func (p *apiServerPetClient) getPVC(pvcName, pvcNamespace string) (*api.PersistentVolumeClaim, bool, error)
```
to:
```
func (p *apiServerPetClient) getPVC(pvcName, pvcNamespace string) (*api.PersistentVolumeClaim, error)
```
I think the 2nd(bool type) return value of [getPVC](https://github.com/kubernetes/kubernetes/blob/master/pkg/controller/petset/pet.go#L228) is unnecessary, as the caller can be responsible for checking the error type and tell if it exists via the [error type](https://github.com/kubernetes/kubernetes/blob/master/pkg/controller/petset/pet.go#L231-L233).
So, I remove the 2nd return value of `getPVC()`.
The benefit of this change is that we can simplify the code of `getPVC()` while don't increase the caller's code.
2016-09-09 15:00:22 -07:00
..
2016-08-30 09:51:50 -04:00
2016-09-05 18:57:04 -07:00
2016-08-30 09:51:50 -04:00
2016-08-30 09:51:50 -04:00
2016-09-01 14:49:52 -07:00
2016-08-04 09:02:13 +02:00
2016-09-08 01:29:48 -07:00
2016-08-30 09:51:50 -04:00
2016-09-02 00:50:02 -07:00
2016-09-08 12:20:51 +02:00
2016-09-09 15:00:22 -07:00
2016-09-06 00:38:46 -07:00
2016-07-16 13:48:21 -04:00
2016-08-30 09:51:50 -04:00
2016-09-06 08:50:44 +02:00
2016-08-30 09:51:50 -04:00
2016-07-16 13:48:21 -04:00
2016-08-25 17:01:22 -07:00
2016-08-23 14:49:54 +08:00
2016-08-30 09:51:50 -04:00
2016-09-07 09:11:41 +02:00
2016-08-17 13:05:37 -07:00
2016-08-17 13:05:37 -07:00
2016-08-22 09:39:32 +02:00
2016-07-16 13:48:21 -04:00
2016-06-29 17:47:36 -07:00
2016-05-11 13:34:51 -07:00