This is an automated email from the ASF dual-hosted git repository.
zhongxjian pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-kubernetes.git
The following commit(s) were added to refs/heads/master by this push:
new 1bbc3853 fix lint (#850)
1bbc3853 is described below
commit 1bbc3853803a66e1e34e748d7f760e5c9024194e
Author: mfordjody <[email protected]>
AuthorDate: Tue Jan 20 01:40:25 2026 +0800
fix lint (#850)
* fix lint
* fix lint v2
* fix lint v3
* fix lint v4
---
.github/workflows/ci.yml | 3 -
api/annotation/annotations.gen.go | 67 +++++++++---------
api/label/labels.gen.go | 93 ++++++++++++-------------
dubboctl/pkg/sdk/tpl/zz_filesystem_generated.go | 3 +-
pkg/config/schema/gvk/resources.go | 2 +-
pkg/config/schema/gvr/resources.go | 2 +-
6 files changed, 80 insertions(+), 90 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index ec13911d..e5841e0d 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -87,9 +87,6 @@ jobs:
- name: Download dependencies
run: go mod download
- - name: Run go vet
- run: go vet ./...
-
- name: Run go fmt check
run: |
if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then
diff --git a/api/annotation/annotations.gen.go
b/api/annotation/annotations.gen.go
index cfa91f72..3100adb5 100644
--- a/api/annotation/annotations.gen.go
+++ b/api/annotation/annotations.gen.go
@@ -1,4 +1,3 @@
-
// GENERATED FILE -- DO NOT EDIT
package annotation
@@ -27,7 +26,7 @@ type ResourceTypes int
const (
Unknown ResourceTypes = iota
- Pod
+ Pod
)
func (r ResourceTypes) String() string {
@@ -60,14 +59,13 @@ type Instance struct {
}
var (
-
- OrgApacheDubboRev = Instance {
- Name: "dubbo.apache.org/rev",
- Description: "Specifies a control plane revision to which a
given proxy "+
- "is connected. This annotation is added automatically,
not "+
- "set by a user. In contrary to the label "+
- "dubbo.apache.org/rev, it represents the actual
revision, "+
- "not the requested revision.",
+ OrgApacheDubboRev = Instance{
+ Name: "dubbo.apache.org/rev",
+ Description: "Specifies a control plane revision to which a
given proxy " +
+ "is connected. This annotation is added automatically,
not " +
+ "set by a user. In contrary to the label " +
+ "dubbo.apache.org/rev, it represents the actual
revision, " +
+ "not the requested revision.",
FeatureStatus: Alpha,
Hidden: false,
Deprecated: false,
@@ -76,10 +74,10 @@ var (
},
}
- OrgApacheDubboInjectTemplates = Instance {
- Name: "inject.dubbo.apache.org/templates",
- Description: "The name of the inject template(s) to use, as a
comma "+
- "separate list.",
+ OrgApacheDubboInjectTemplates = Instance{
+ Name: "inject.dubbo.apache.org/templates",
+ Description: "The name of the inject template(s) to use, as a
comma " +
+ "separate list.",
FeatureStatus: Alpha,
Hidden: false,
Deprecated: false,
@@ -88,10 +86,10 @@ var (
},
}
- OrgApacheDubboProxyConfig = Instance {
- Name: "proxy.dubbo.apache.org/config",
- Description: "Overrides for the proxy configuration for this
specific "+
- "proxy.",
+ OrgApacheDubboProxyConfig = Instance{
+ Name: "proxy.dubbo.apache.org/config",
+ Description: "Overrides for the proxy configuration for this
specific " +
+ "proxy.",
FeatureStatus: Beta,
Hidden: false,
Deprecated: false,
@@ -100,10 +98,10 @@ var (
},
}
- OrgApacheDubboProxyOverrides = Instance {
- Name: "proxy.dubbo.apache.org/overrides",
- Description: "Used internally to indicate user-specified
overrides in "+
- "the proxy container of the pod during injection.",
+ OrgApacheDubboProxyOverrides = Instance{
+ Name: "proxy.dubbo.apache.org/overrides",
+ Description: "Used internally to indicate user-specified
overrides in " +
+ "the proxy container of the pod during injection.",
FeatureStatus: Alpha,
Hidden: true,
Deprecated: false,
@@ -112,10 +110,10 @@ var (
},
}
- OrgApacheDubboProxylessInject = Instance {
- Name: "proxyless.dubbo.apache.org/inject",
- Description: "Specifies whether or not an proxyless adapter
should be "+
- "automatically injected into the workload.",
+ OrgApacheDubboProxylessInject = Instance{
+ Name: "proxyless.dubbo.apache.org/inject",
+ Description: "Specifies whether or not an proxyless adapter
should be " +
+ "automatically injected into the workload.",
FeatureStatus: Alpha,
Hidden: false,
Deprecated: true,
@@ -124,12 +122,12 @@ var (
},
}
- OrgApacheDubboProxylessStatus = Instance {
- Name: "proxyless.dubbo.apache.org/status",
- Description: "Generated by proxyless adapter injection that
indicates "+
- "the status of the operation. Includes a version hash
of "+
- "the executed template, as well as names of injected "+
- "resources.",
+ OrgApacheDubboProxylessStatus = Instance{
+ Name: "proxyless.dubbo.apache.org/status",
+ Description: "Generated by proxyless adapter injection that
indicates " +
+ "the status of the operation. Includes a version hash
of " +
+ "the executed template, as well as names of injected " +
+ "resources.",
FeatureStatus: Alpha,
Hidden: false,
Deprecated: false,
@@ -137,11 +135,10 @@ var (
Pod,
},
}
-
)
func AllResourceAnnotations() []*Instance {
- return []*Instance {
+ return []*Instance{
&OrgApacheDubboRev,
&OrgApacheDubboInjectTemplates,
&OrgApacheDubboProxyConfig,
@@ -152,7 +149,7 @@ func AllResourceAnnotations() []*Instance {
}
func AllResourceTypes() []string {
- return []string {
+ return []string{
"Pod",
}
}
diff --git a/api/label/labels.gen.go b/api/label/labels.gen.go
index 0d7ba4b9..9627d46a 100644
--- a/api/label/labels.gen.go
+++ b/api/label/labels.gen.go
@@ -1,4 +1,3 @@
-
// GENERATED FILE -- DO NOT EDIT
package label
@@ -27,15 +26,15 @@ type ResourceTypes int
const (
Unknown ResourceTypes = iota
- Any
- Deployment
- Gateway
- HorizontalPodAutoscaler
- Namespace
- Pod
- PodDisruptionBudget
- Service
- ServiceAccount
+ Any
+ Deployment
+ Gateway
+ HorizontalPodAutoscaler
+ Namespace
+ Pod
+ PodDisruptionBudget
+ Service
+ ServiceAccount
)
func (r ResourceTypes) String() string {
@@ -84,11 +83,10 @@ type Instance struct {
}
var (
-
- OrgApacheDubboRev = Instance {
- Name: "dubbo.apache.org/rev",
- Description: "Dubbo control plane revision or tag associated
with the "+
- "resource; e.g. `canary`",
+ OrgApacheDubboRev = Instance{
+ Name: "dubbo.apache.org/rev",
+ Description: "Dubbo control plane revision or tag associated
with the " +
+ "resource; e.g. `canary`",
FeatureStatus: Beta,
Hidden: false,
Deprecated: false,
@@ -99,13 +97,13 @@ var (
},
}
- IoK8sNetworkingGatewayGatewayClassName = Instance {
- Name: "gateway.networking.k8s.io/gateway-class-name",
- Description: "Automatically added to all resources
[automatically "+
-
"created](/docs/tasks/traffic-management/ingress/gateway-api/#automated-deployment)
"+
- "by Dubbo Gateway controller to indicate which "+
- "`GatewayClass` resulted in the object creation. Users
"+
- "should not set this label themselves.",
+ IoK8sNetworkingGatewayGatewayClassName = Instance{
+ Name: "gateway.networking.k8s.io/gateway-class-name",
+ Description: "Automatically added to all resources
[automatically " +
+
"created](/docs/tasks/traffic-management/ingress/gateway-api/#automated-deployment)
" +
+ "by Dubbo Gateway controller to indicate which " +
+ "`GatewayClass` resulted in the object creation. Users
" +
+ "should not set this label themselves.",
FeatureStatus: Stable,
Hidden: false,
Deprecated: false,
@@ -118,13 +116,13 @@ var (
},
}
- IoK8sNetworkingGatewayGatewayName = Instance {
- Name: "gateway.networking.k8s.io/gateway-name",
- Description: "Automatically added to all resources
[automatically "+
-
"created](/docs/tasks/traffic-management/ingress/gateway-api/#automated-deployment)
"+
- "by Dubbo Gateway controller to indicate which
`Gateway` "+
- "resulted in the object creation. Users should not set
"+
- "this label themselves.",
+ IoK8sNetworkingGatewayGatewayName = Instance{
+ Name: "gateway.networking.k8s.io/gateway-name",
+ Description: "Automatically added to all resources
[automatically " +
+
"created](/docs/tasks/traffic-management/ingress/gateway-api/#automated-deployment)
" +
+ "by Dubbo Gateway controller to indicate which
`Gateway` " +
+ "resulted in the object creation. Users should not set
" +
+ "this label themselves.",
FeatureStatus: Stable,
Hidden: false,
Deprecated: false,
@@ -137,10 +135,10 @@ var (
},
}
- OrgApacheDubboOperatorComponent = Instance {
- Name: "operator.dubbo.apache.org/component",
- Description: "Dubbo operator component name of the resource,
e.g. "+
- "`Pilot`",
+ OrgApacheDubboOperatorComponent = Instance{
+ Name: "operator.dubbo.apache.org/component",
+ Description: "Dubbo operator component name of the resource,
e.g. " +
+ "`Pilot`",
FeatureStatus: Alpha,
Hidden: true,
Deprecated: false,
@@ -149,10 +147,10 @@ var (
},
}
- OrgApacheDubboOperatorManaged = Instance {
- Name: "operator.dubbo.apache.org/managed",
- Description: "Set to `Reconcile` if the Dubbo operator will
reconcile "+
- "the resource.",
+ OrgApacheDubboOperatorManaged = Instance{
+ Name: "operator.dubbo.apache.org/managed",
+ Description: "Set to `Reconcile` if the Dubbo operator will
reconcile " +
+ "the resource.",
FeatureStatus: Alpha,
Hidden: true,
Deprecated: false,
@@ -161,10 +159,10 @@ var (
},
}
- OrgApacheDubboOperatorVersion = Instance {
- Name: "operator.dubbo.apache.org/version",
- Description: "The Dubbo operator version that installed the
resource, "+
- "e.g. `1.6.0`",
+ OrgApacheDubboOperatorVersion = Instance{
+ Name: "operator.dubbo.apache.org/version",
+ Description: "The Dubbo operator version that installed the
resource, " +
+ "e.g. `1.6.0`",
FeatureStatus: Alpha,
Hidden: true,
Deprecated: false,
@@ -173,10 +171,10 @@ var (
},
}
- OrgApacheDubboProxylessInject = Instance {
- Name: "proxyless.dubbo.apache.org/inject",
- Description: "Specifies whether or not an proxyless adapter
should be "+
- "automatically injected into the workload.",
+ OrgApacheDubboProxylessInject = Instance{
+ Name: "proxyless.dubbo.apache.org/inject",
+ Description: "Specifies whether or not an proxyless adapter
should be " +
+ "automatically injected into the workload.",
FeatureStatus: Alpha,
Hidden: false,
Deprecated: false,
@@ -184,11 +182,10 @@ var (
Pod,
},
}
-
)
func AllResourceLabels() []*Instance {
- return []*Instance {
+ return []*Instance{
&OrgApacheDubboRev,
&IoK8sNetworkingGatewayGatewayClassName,
&IoK8sNetworkingGatewayGatewayName,
@@ -200,7 +197,7 @@ func AllResourceLabels() []*Instance {
}
func AllResourceTypes() []string {
- return []string {
+ return []string{
"Any",
"Deployment",
"Gateway",
diff --git a/dubboctl/pkg/sdk/tpl/zz_filesystem_generated.go
b/dubboctl/pkg/sdk/tpl/zz_filesystem_generated.go
index b1caf69e..41f38c9d 100644
--- a/dubboctl/pkg/sdk/tpl/zz_filesystem_generated.go
+++ b/dubboctl/pkg/sdk/tpl/zz_filesystem_generated.go
@@ -1,4 +1,3 @@
-//
// Licensed to the Apache Software Foundation (ASF) under one or more
// contributor license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright ownership.
@@ -6,7 +5,7 @@
// (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
//
-// http://www.apache.org/licenses/LICENSE-2.0
+// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/pkg/config/schema/gvk/resources.go
b/pkg/config/schema/gvk/resources.go
index e0cbf9d9..1e06690a 100644
--- a/pkg/config/schema/gvk/resources.go
+++ b/pkg/config/schema/gvk/resources.go
@@ -38,7 +38,7 @@ var (
Pod = config.GroupVersionKind{Group: "",
Version: "v1", Kind: "Pod"}
MeshGlobalConfig = config.GroupVersionKind{Group: "",
Version: "v1alpha1", Kind: "MeshGlobalConfig"}
PeerAuthentication = config.GroupVersionKind{Group:
"security.dubbo.apache.org", Version: "v1", Kind: "PeerAuthentication"}
- DestinationRule = config.GroupVersionKind{Group:
"networking.dubbo.apache.org", Version: "v1alpha3", Kind: "DestinationRule"}
+ DestinationRule = config.GroupVersionKind{Group:
"networking.dubbo.apache.org", Version: "v1alpha3", Kind: "DestinationRule"}
VirtualService = config.GroupVersionKind{Group:
"networking.dubbo.apache.org", Version: "v1", Kind: "VirtualService"}
EndpointSlice = config.GroupVersionKind{Group:
"discovery.k8s.io", Version: "v1", Kind: "EndpointSlice"}
Endpoints = config.GroupVersionKind{Group: "",
Version: "v1", Kind: "Endpoints"}
diff --git a/pkg/config/schema/gvr/resources.go
b/pkg/config/schema/gvr/resources.go
index 7a02eb63..2d482ca0 100644
--- a/pkg/config/schema/gvr/resources.go
+++ b/pkg/config/schema/gvr/resources.go
@@ -35,7 +35,7 @@ var (
ServiceAccount = schema.GroupVersionResource{Group: "",
Version: "v1", Resource: "serviceaccounts"}
MeshGlobalConfig = schema.GroupVersionResource{Group: "",
Version: "v1alpha1", Resource: "meshglobalconfigs"}
PeerAuthentication = schema.GroupVersionResource{Group:
"security.dubbo.apache.org", Version: "v1", Resource: "peerauthentications"}
- DestinationRule =
schema.GroupVersionResource{Group: "networking.dubbo.apache.org", Version:
"v1alpha3", Resource: "destinationrules"}
+ DestinationRule = schema.GroupVersionResource{Group:
"networking.dubbo.apache.org", Version: "v1alpha3", Resource:
"destinationrules"}
VirtualService = schema.GroupVersionResource{Group:
"networking.dubbo.apache.org", Version: "v1", Resource: "virtualservices"}
EndpointSlice = schema.GroupVersionResource{Group:
"discovery.k8s.io", Version: "v1", Resource: "endpointslices"}
Endpoints = schema.GroupVersionResource{Group: "",
Version: "v1", Resource: "endpoints"}