From 7ac59bc1ae51ee54570c97bd9cd2c7a2376aed0f Mon Sep 17 00:00:00 2001 From: leiiwang Date: Wed, 12 Feb 2020 20:09:16 +0800 Subject: [PATCH] add compatibility with dep for semantic versioning --- allocator/doc.go | 2 +- controller/controller.go | 4 ++-- controller/doc.go | 2 +- controller/metrics/doc.go | 2 +- gidallocator/doc.go | 2 +- gidallocator/gidallocator.go | 6 +++--- go.mod | 2 +- mount/doc.go | 2 +- util/doc.go | 2 +- v5/README.md | 18 ++++++++++++++++++ v5/allocator/doc.go | 1 + v5/allocator/minmax.go | 1 + v5/allocator/minmax_test.go | 1 + v5/controller/controller.go | 1 + v5/controller/controller_test.go | 1 + v5/controller/doc.go | 1 + v5/controller/metrics/doc.go | 1 + v5/controller/metrics/metrics.go | 1 + v5/controller/volume.go | 1 + v5/controller/volume_store.go | 1 + v5/gidallocator/doc.go | 1 + v5/gidallocator/gidallocator.go | 1 + v5/mount/LICENSE | 1 + v5/mount/doc.go | 1 + v5/mount/mount.go | 1 + v5/mount/mountinfo.go | 1 + v5/mount/mountinfo_linux.go | 1 + v5/mount/mountinfo_unsupported.go | 1 + v5/util/doc.go | 1 + v5/util/util.go | 1 + 30 files changed, 50 insertions(+), 12 deletions(-) create mode 100644 v5/README.md create mode 120000 v5/allocator/doc.go create mode 120000 v5/allocator/minmax.go create mode 120000 v5/allocator/minmax_test.go create mode 120000 v5/controller/controller.go create mode 120000 v5/controller/controller_test.go create mode 120000 v5/controller/doc.go create mode 120000 v5/controller/metrics/doc.go create mode 120000 v5/controller/metrics/metrics.go create mode 120000 v5/controller/volume.go create mode 120000 v5/controller/volume_store.go create mode 120000 v5/gidallocator/doc.go create mode 120000 v5/gidallocator/gidallocator.go create mode 120000 v5/mount/LICENSE create mode 120000 v5/mount/doc.go create mode 120000 v5/mount/mount.go create mode 120000 v5/mount/mountinfo.go create mode 120000 v5/mount/mountinfo_linux.go create mode 120000 v5/mount/mountinfo_unsupported.go create mode 120000 v5/util/doc.go create mode 120000 v5/util/util.go diff --git a/allocator/doc.go b/allocator/doc.go index acb2d7b..46c7e5e 100644 --- a/allocator/doc.go +++ b/allocator/doc.go @@ -14,4 +14,4 @@ See the License for the specific language governing permissions and limitations under the License. */ -package allocator // import "sigs.k8s.io/sig-storage-lib-external-provisioner/allocator" +package allocator // import "sigs.k8s.io/sig-storage-lib-external-provisioner/v5/allocator" diff --git a/controller/controller.go b/controller/controller.go index e8ba652..b24a93a 100644 --- a/controller/controller.go +++ b/controller/controller.go @@ -51,8 +51,8 @@ import ( ref "k8s.io/client-go/tools/reference" "k8s.io/client-go/util/workqueue" glog "k8s.io/klog" - "sigs.k8s.io/sig-storage-lib-external-provisioner/controller/metrics" - "sigs.k8s.io/sig-storage-lib-external-provisioner/util" + "sigs.k8s.io/sig-storage-lib-external-provisioner/v5/controller/metrics" + "sigs.k8s.io/sig-storage-lib-external-provisioner/v5/util" ) // annClass annotation represents the storage class associated with a resource: diff --git a/controller/doc.go b/controller/doc.go index f1db463..8b050be 100644 --- a/controller/doc.go +++ b/controller/doc.go @@ -14,4 +14,4 @@ See the License for the specific language governing permissions and limitations under the License. */ -package controller // import "sigs.k8s.io/sig-storage-lib-external-provisioner/controller" +package controller // import "sigs.k8s.io/sig-storage-lib-external-provisioner/v5/controller" diff --git a/controller/metrics/doc.go b/controller/metrics/doc.go index eac1f35..7e0a2cb 100644 --- a/controller/metrics/doc.go +++ b/controller/metrics/doc.go @@ -14,4 +14,4 @@ See the License for the specific language governing permissions and limitations under the License. */ -package metrics // import "sigs.k8s.io/sig-storage-lib-external-provisioner/controller/metrics" +package metrics // import "sigs.k8s.io/sig-storage-lib-external-provisioner/v5/controller/metrics" diff --git a/gidallocator/doc.go b/gidallocator/doc.go index 0a3580d..ef3d298 100644 --- a/gidallocator/doc.go +++ b/gidallocator/doc.go @@ -14,4 +14,4 @@ See the License for the specific language governing permissions and limitations under the License. */ -package gidallocator // import "sigs.k8s.io/sig-storage-lib-external-provisioner/gidallocator" +package gidallocator // import "sigs.k8s.io/sig-storage-lib-external-provisioner/v5/gidallocator" diff --git a/gidallocator/gidallocator.go b/gidallocator/gidallocator.go index 59e7b00..514ea7b 100644 --- a/gidallocator/gidallocator.go +++ b/gidallocator/gidallocator.go @@ -27,9 +27,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes" glog "k8s.io/klog" - "sigs.k8s.io/sig-storage-lib-external-provisioner/allocator" - "sigs.k8s.io/sig-storage-lib-external-provisioner/controller" - "sigs.k8s.io/sig-storage-lib-external-provisioner/util" + "sigs.k8s.io/sig-storage-lib-external-provisioner/v5/allocator" + "sigs.k8s.io/sig-storage-lib-external-provisioner/v5/controller" + "sigs.k8s.io/sig-storage-lib-external-provisioner/v5/util" ) const ( diff --git a/go.mod b/go.mod index ccb21df..930c66b 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module sigs.k8s.io/sig-storage-lib-external-provisioner +module sigs.k8s.io/sig-storage-lib-external-provisioner/v5 go 1.13 diff --git a/mount/doc.go b/mount/doc.go index 7031b99..46e904f 100644 --- a/mount/doc.go +++ b/mount/doc.go @@ -14,4 +14,4 @@ See the License for the specific language governing permissions and limitations under the License. */ -package mount // import "sigs.k8s.io/sig-storage-lib-external-provisioner/mount" +package mount // import "sigs.k8s.io/sig-storage-lib-external-provisioner/v5/mount" diff --git a/util/doc.go b/util/doc.go index 3697f68..bdf11e6 100644 --- a/util/doc.go +++ b/util/doc.go @@ -14,4 +14,4 @@ See the License for the specific language governing permissions and limitations under the License. */ -package util // import "sigs.k8s.io/sig-storage-lib-external-provisioner/util" +package util // import "sigs.k8s.io/sig-storage-lib-external-provisioner/v5/util" diff --git a/v5/README.md b/v5/README.md new file mode 100644 index 0000000..d7010b6 --- /dev/null +++ b/v5/README.md @@ -0,0 +1,18 @@ +This directory mirrors the source code via symlinks. +This makes it possible to vendor v5.x releases of +sig-storage-lib-external-provisioner with `dep` versions that do not +support semantic imports. Support for that is currently +[pending in dep](https://github.com/golang/dep/pull/1963). + +If users of dep have enabled pruning, they must disable if +for sig-storage-lib-external-provisioner in their Gopk.toml, like this: + +```toml +[prune] + go-tests = true + unused-packages = true + + [[prune.project]] + name = "sigs.k8s.io/sig-storage-lib-external-provisioner" + unused-packages = false +``` diff --git a/v5/allocator/doc.go b/v5/allocator/doc.go new file mode 120000 index 0000000..c654ff7 --- /dev/null +++ b/v5/allocator/doc.go @@ -0,0 +1 @@ +../../allocator/doc.go \ No newline at end of file diff --git a/v5/allocator/minmax.go b/v5/allocator/minmax.go new file mode 120000 index 0000000..5c2383e --- /dev/null +++ b/v5/allocator/minmax.go @@ -0,0 +1 @@ +../../allocator/minmax.go \ No newline at end of file diff --git a/v5/allocator/minmax_test.go b/v5/allocator/minmax_test.go new file mode 120000 index 0000000..696a9a6 --- /dev/null +++ b/v5/allocator/minmax_test.go @@ -0,0 +1 @@ +../../allocator/minmax_test.go \ No newline at end of file diff --git a/v5/controller/controller.go b/v5/controller/controller.go new file mode 120000 index 0000000..fefea84 --- /dev/null +++ b/v5/controller/controller.go @@ -0,0 +1 @@ +../../controller/controller.go \ No newline at end of file diff --git a/v5/controller/controller_test.go b/v5/controller/controller_test.go new file mode 120000 index 0000000..4e3f1d3 --- /dev/null +++ b/v5/controller/controller_test.go @@ -0,0 +1 @@ +../../controller/controller_test.go \ No newline at end of file diff --git a/v5/controller/doc.go b/v5/controller/doc.go new file mode 120000 index 0000000..5df2f72 --- /dev/null +++ b/v5/controller/doc.go @@ -0,0 +1 @@ +../../controller/doc.go \ No newline at end of file diff --git a/v5/controller/metrics/doc.go b/v5/controller/metrics/doc.go new file mode 120000 index 0000000..5124915 --- /dev/null +++ b/v5/controller/metrics/doc.go @@ -0,0 +1 @@ +../../../controller/metrics/doc.go \ No newline at end of file diff --git a/v5/controller/metrics/metrics.go b/v5/controller/metrics/metrics.go new file mode 120000 index 0000000..513b104 --- /dev/null +++ b/v5/controller/metrics/metrics.go @@ -0,0 +1 @@ +../../../controller/metrics/metrics.go \ No newline at end of file diff --git a/v5/controller/volume.go b/v5/controller/volume.go new file mode 120000 index 0000000..a5701d9 --- /dev/null +++ b/v5/controller/volume.go @@ -0,0 +1 @@ +../../controller/volume.go \ No newline at end of file diff --git a/v5/controller/volume_store.go b/v5/controller/volume_store.go new file mode 120000 index 0000000..e07a702 --- /dev/null +++ b/v5/controller/volume_store.go @@ -0,0 +1 @@ +../../controller/volume_store.go \ No newline at end of file diff --git a/v5/gidallocator/doc.go b/v5/gidallocator/doc.go new file mode 120000 index 0000000..fc0f2a0 --- /dev/null +++ b/v5/gidallocator/doc.go @@ -0,0 +1 @@ +../../gidallocator/doc.go \ No newline at end of file diff --git a/v5/gidallocator/gidallocator.go b/v5/gidallocator/gidallocator.go new file mode 120000 index 0000000..e9267ee --- /dev/null +++ b/v5/gidallocator/gidallocator.go @@ -0,0 +1 @@ +../../gidallocator/gidallocator.go \ No newline at end of file diff --git a/v5/mount/LICENSE b/v5/mount/LICENSE new file mode 120000 index 0000000..9d0339e --- /dev/null +++ b/v5/mount/LICENSE @@ -0,0 +1 @@ +../../mount/LICENSE \ No newline at end of file diff --git a/v5/mount/doc.go b/v5/mount/doc.go new file mode 120000 index 0000000..411894f --- /dev/null +++ b/v5/mount/doc.go @@ -0,0 +1 @@ +../../mount/doc.go \ No newline at end of file diff --git a/v5/mount/mount.go b/v5/mount/mount.go new file mode 120000 index 0000000..ff60d76 --- /dev/null +++ b/v5/mount/mount.go @@ -0,0 +1 @@ +../../mount/mount.go \ No newline at end of file diff --git a/v5/mount/mountinfo.go b/v5/mount/mountinfo.go new file mode 120000 index 0000000..bd1a086 --- /dev/null +++ b/v5/mount/mountinfo.go @@ -0,0 +1 @@ +../../mount/mountinfo.go \ No newline at end of file diff --git a/v5/mount/mountinfo_linux.go b/v5/mount/mountinfo_linux.go new file mode 120000 index 0000000..a8b50ce --- /dev/null +++ b/v5/mount/mountinfo_linux.go @@ -0,0 +1 @@ +../../mount/mountinfo_linux.go \ No newline at end of file diff --git a/v5/mount/mountinfo_unsupported.go b/v5/mount/mountinfo_unsupported.go new file mode 120000 index 0000000..3c876bc --- /dev/null +++ b/v5/mount/mountinfo_unsupported.go @@ -0,0 +1 @@ +../../mount/mountinfo_unsupported.go \ No newline at end of file diff --git a/v5/util/doc.go b/v5/util/doc.go new file mode 120000 index 0000000..f132862 --- /dev/null +++ b/v5/util/doc.go @@ -0,0 +1 @@ +../../util/doc.go \ No newline at end of file diff --git a/v5/util/util.go b/v5/util/util.go new file mode 120000 index 0000000..faed3c8 --- /dev/null +++ b/v5/util/util.go @@ -0,0 +1 @@ +../../util/util.go \ No newline at end of file