Files
kubernetes/pkg/util
Kubernetes Submit Queue ed8993e3df Merge pull request #47944 from allencloud/fix-CopyStrings-and-ShuffleStrings-when-slice-is-nil
Automatic merge from submit-queue (batch tested with PRs 48264, 48324, 48125, 47944, 47489)

fix CopyStrings and ShuffleStrings for slice when slice is nil

Signed-off-by: allencloud <allen.sun@daocloud.io>



**What this PR does / why we need it**:
This PR fixes two functions in util/slice.go, in which I think `CopyStrings` and `ShuffleStrings` miss one case. The case is input data is nil, in this case I think the data returned should be nil as well rather than a non-nil slice with 0 element.
In addition, I added some test code for this.
 
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
NONE, I did not raise a issue for this code. I ran into this when code learning.

**Special notes for your reviewer**:
NONE

**Release note**:

```release-note
NONE
```
2017-06-30 20:58:33 -07:00
..
2017-05-17 20:35:37 +00:00
2017-04-14 10:40:57 -07:00
2017-04-14 10:40:57 -07:00
2017-04-25 11:23:33 -07:00
2017-01-30 12:46:59 -05:00
2017-06-26 16:05:35 +02:00
2017-04-14 10:40:57 -07:00
2017-04-14 10:40:57 -07:00
2017-04-14 10:40:57 -07:00
2017-04-14 10:40:57 -07:00
2017-01-05 14:14:13 -08:00
2017-04-14 10:40:57 -07:00
2017-04-14 10:40:57 -07:00
2017-04-14 10:40:57 -07:00
2017-04-14 10:40:57 -07:00
2017-04-14 10:40:57 -07:00
2017-01-16 16:04:03 -05:00
2017-04-14 10:40:57 -07:00
2017-04-14 10:40:57 -07:00
2017-04-14 10:40:57 -07:00
2017-05-01 11:11:14 -07:00
2017-06-22 11:31:03 -07:00
2017-06-22 11:31:03 -07:00
2017-04-14 10:40:57 -07:00
2017-04-06 16:15:34 -04:00
2017-01-25 19:49:45 +01:00
2017-04-14 10:40:57 -07:00
2017-06-30 15:00:24 -07:00