From 74b7ed00143420ad1b25bc318c593ff0f206f860 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Mon, 2 Dec 2024 14:43:58 +0100 Subject: [PATCH] remove import doc comments The "// import " comment has been superseded by Go modules. We don't have to remove them, but doing so has some advantages: - They are used inconsistently, which is confusing. - We can then also remove the (currently broken) hack/update-vanity-imports.sh. - Last but not least, it would be a first step towards avoiding the k8s.io domain. This commit was generated with sed -i -e 's;^package \(.*\) // import.*;package \1;' $(git grep -l '^package.*// import' | grep -v 'vendor/') Everything was included, except for package labels // import k8s.io/kubernetes/pkg/util/labels because that package is marked as "read-only". Kubernetes-commit: 8a908e0c0bd96a3455edf7e3b5f5af90564e65b0 --- config/v1/doc.go | 2 +- config/v1alpha1/doc.go | 2 +- config/v1beta1/doc.go | 2 +- doc.go | 2 +- pkg/apis/credentialprovider/doc.go | 2 +- pkg/apis/credentialprovider/v1/doc.go | 2 +- pkg/apis/credentialprovider/v1alpha1/doc.go | 2 +- pkg/apis/credentialprovider/v1beta1/doc.go | 2 +- pkg/cri/streaming/remotecommand/doc.go | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/config/v1/doc.go b/config/v1/doc.go index b411f71..2c2ec7a 100644 --- a/config/v1/doc.go +++ b/config/v1/doc.go @@ -18,4 +18,4 @@ limitations under the License. // +k8s:openapi-gen=true // +groupName=kubelet.config.k8s.io -package v1 // import "k8s.io/kubelet/config/v1" +package v1 diff --git a/config/v1alpha1/doc.go b/config/v1alpha1/doc.go index 0c2d9f1..165efbb 100644 --- a/config/v1alpha1/doc.go +++ b/config/v1alpha1/doc.go @@ -18,4 +18,4 @@ limitations under the License. // +k8s:openapi-gen=true // +groupName=kubelet.config.k8s.io -package v1alpha1 // import "k8s.io/kubelet/config/v1alpha1" +package v1alpha1 diff --git a/config/v1beta1/doc.go b/config/v1beta1/doc.go index 5644377..0edffa4 100644 --- a/config/v1beta1/doc.go +++ b/config/v1beta1/doc.go @@ -18,4 +18,4 @@ limitations under the License. // +k8s:openapi-gen=true // +groupName=kubelet.config.k8s.io -package v1beta1 // import "k8s.io/kubelet/config/v1beta1" +package v1beta1 diff --git a/doc.go b/doc.go index c28502e..012f402 100644 --- a/doc.go +++ b/doc.go @@ -14,4 +14,4 @@ See the License for the specific language governing permissions and limitations under the License. */ -package kubelet // import "k8s.io/kubelet" +package kubelet diff --git a/pkg/apis/credentialprovider/doc.go b/pkg/apis/credentialprovider/doc.go index 1815830..7f90183 100644 --- a/pkg/apis/credentialprovider/doc.go +++ b/pkg/apis/credentialprovider/doc.go @@ -17,4 +17,4 @@ limitations under the License. // +k8s:deepcopy-gen=package // +groupName=credentialprovider.kubelet.k8s.io -package credentialprovider // import "k8s.io/kubelet/pkg/apis/credentialprovider" +package credentialprovider diff --git a/pkg/apis/credentialprovider/v1/doc.go b/pkg/apis/credentialprovider/v1/doc.go index 474a085..871ccc8 100644 --- a/pkg/apis/credentialprovider/v1/doc.go +++ b/pkg/apis/credentialprovider/v1/doc.go @@ -19,4 +19,4 @@ limitations under the License. // +k8s:defaulter-gen=TypeMeta // +groupName=credentialprovider.kubelet.k8s.io -package v1 // import "k8s.io/kubelet/pkg/apis/credentialprovider/v1" +package v1 diff --git a/pkg/apis/credentialprovider/v1alpha1/doc.go b/pkg/apis/credentialprovider/v1alpha1/doc.go index 6c0f42a..9b3a5bc 100644 --- a/pkg/apis/credentialprovider/v1alpha1/doc.go +++ b/pkg/apis/credentialprovider/v1alpha1/doc.go @@ -19,4 +19,4 @@ limitations under the License. // +k8s:defaulter-gen=TypeMeta // +groupName=credentialprovider.kubelet.k8s.io -package v1alpha1 // import "k8s.io/kubelet/pkg/apis/credentialprovider/v1alpha1" +package v1alpha1 diff --git a/pkg/apis/credentialprovider/v1beta1/doc.go b/pkg/apis/credentialprovider/v1beta1/doc.go index df4f4bf..1c4c355 100644 --- a/pkg/apis/credentialprovider/v1beta1/doc.go +++ b/pkg/apis/credentialprovider/v1beta1/doc.go @@ -19,4 +19,4 @@ limitations under the License. // +k8s:defaulter-gen=TypeMeta // +groupName=credentialprovider.kubelet.k8s.io -package v1beta1 // import "k8s.io/kubelet/pkg/apis/credentialprovider/v1beta1" +package v1beta1 diff --git a/pkg/cri/streaming/remotecommand/doc.go b/pkg/cri/streaming/remotecommand/doc.go index c3b6a6b..bf0d010 100644 --- a/pkg/cri/streaming/remotecommand/doc.go +++ b/pkg/cri/streaming/remotecommand/doc.go @@ -15,4 +15,4 @@ limitations under the License. */ // Package remotecommand contains functions related to executing commands in and attaching to pods. -package remotecommand // import "k8s.io/kubelet/pkg/cri/streaming/remotecommand" +package remotecommand