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-01 13:40:34 -04:00
2016-09-07 10:14:32 -07:00
2016-08-15 17:35:10 -07:00
2016-09-08 08:23:01 -07:00
2016-09-09 11:43:28 +02:00
2016-08-23 00:19:25 -07:00
2016-07-16 13:48:21 -04:00
2016-09-08 01:29:48 -07:00
2016-09-09 13:09:59 -07:00
2016-09-09 15:00:22 -07:00
2016-08-18 14:45:00 -04:00
2016-07-27 16:04:20 +08:00
2016-08-31 18:56:52 +02:00
2016-08-16 14:41:17 -04:00
2016-08-20 10:10:51 -07:00
2016-09-09 11:43:28 +02:00
2016-07-18 22:46:09 +08:00
2016-08-31 13:46:40 -07:00
2016-07-16 13:48:21 -04:00
2016-09-09 11:52:42 -07:00
2016-09-08 21:41:03 -07:00
2016-08-25 10:57:31 -07:00
2016-08-22 09:39:32 +02:00
2016-09-08 08:57:10 -04:00
2016-06-29 17:47:36 -07:00
2016-08-02 08:02:32 -07:00
2016-09-06 11:04:36 -07:00
2016-08-22 14:18:15 -04:00
2016-09-09 13:47:47 -07:00
2016-08-22 21:09:57 -07:00
2016-09-01 15:55:34 -07:00
2016-07-22 17:41:44 -04:00
2016-08-20 10:10:51 -07:00
2016-07-06 14:25:15 -04:00
2016-07-14 08:48:24 +02:00
2016-09-09 11:35:05 +02:00
2016-08-22 12:59:54 -07:00
2016-07-16 13:48:21 -04:00
2016-09-09 01:37:40 -07:00
2016-08-24 11:47:16 -07:00
2016-09-05 14:53:32 -07:00
2016-09-08 13:38:44 +02:00
2016-06-16 08:21:27 -07:00