Merge pull request #61085 from hzxuzhonghu/unversioned-cleanup

Automatic merge from submit-queue (batch tested with PRs 60919, 60953, 61085, 61083, 60971). 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>.

remove unused `pkg/api/unversioned`

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

clean code, see #61084 

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue
2018-03-20 20:34:31 -07:00
committed by GitHub
9 changed files with 2 additions and 316 deletions

View File

@@ -14,7 +14,6 @@ pkg/api/ref
pkg/api/testapi
pkg/api/testing
pkg/api/testing/compat
pkg/api/unversioned
pkg/api/v1/endpoints
pkg/api/v1/pod
pkg/api/v1/resource

View File

@@ -275,9 +275,6 @@ kube::util::group-version-to-pkg-path() {
meta/v1beta1)
echo "vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1"
;;
unversioned)
echo "pkg/api/unversioned"
;;
*.k8s.io)
echo "pkg/apis/${group_version%.*k8s.io}"
;;

View File

@@ -49,7 +49,7 @@ find_files() {
}
if [[ $# -eq 0 ]]; then
versioned_api_files=$(find_files | egrep "pkg/.[^/]*/((v.[^/]*)|unversioned)/types\.go")
versioned_api_files=$(find_files | egrep "pkg/.[^/]*/((v.[^/]*)|unversioned)/types\.go") || true
else
versioned_api_files="${*}"
fi