Kubeadm: 将所有常量移动到单个const(`

创建于 2019-02-11  ·  4评论  ·  资料来源: kubernetes/kubeadm

将文件cmd/kubeadm/app/cmd/options/constant.go const上的所有cmd/kubeadm/app/cmd/options/constant.go移至单个const (

IE:

- // APIServerAdvertiseAddress flag sets the IP address the API Server will advertise it's listening on. Specify '0.0.0.0' to use the address of the default network interface.
- const APIServerAdvertiseAddress = "apiserver-advertise-address"

- // APIServerBindPort flag sets the port for the API Server to bind to.
- const APIServerBindPort = "apiserver-bind-port"
+ const (
+    // APIServerAdvertiseAddress flag sets the IP address the API Server will advertise it's listening on. Specify '0.0.0.0' to use the address of the default network interface.
+    APIServerAdvertiseAddress = "apiserver-advertise-address"
+
+    // APIServerBindPort flag sets the port for the API Server to bind to.
+    const APIServerBindPort = "apiserver-bind-port"
+)

/种类清理
/优先积压
/帮助
/ good-first-issue

good first issue help wanted kincleanup lifecyclactive prioritbacklog

最有用的评论

@yagonobre ,我想解决这个问题。

您能告诉我在将所有常量都移到一个const之后如何测试此吗?

谢谢你。

所有4条评论

@yagonobre
此请求已被标记为适合新贡献者。

请确保该请求满足此处列出的要求。

如果此请求不再满足这些要求,则可以将标签除去
通过使用/remove-good-first-issue命令进行注释。

针对

将文件cmd/kubeadm/app/cmd/options/constant.go const上的所有cmd/kubeadm/app/cmd/options/constant.go移至单个const (

IE:

- // APIServerAdvertiseAddress flag sets the IP address the API Server will advertise it's listening on. Specify '0.0.0.0' to use the address of the default network interface.
- const APIServerAdvertiseAddress = "apiserver-advertise-address"

- // APIServerBindPort flag sets the port for the API Server to bind to.
- const APIServerBindPort = "apiserver-bind-port"
+ const (
+    // APIServerAdvertiseAddress flag sets the IP address the API Server will advertise it's listening on. Specify '0.0.0.0' to use the address of the default network interface.
+    APIServerAdvertiseAddress = "apiserver-advertise-address"
+
+    // APIServerBindPort flag sets the port for the API Server to bind to.
+    const APIServerBindPort = "apiserver-bind-port"
+)

/种类清理
/优先积压
/帮助
/ good-first-issue

在此处获得有关使用PR注释与我互动的说明。 如果您对我的行为有任何疑问或建议,请针对kubernetes / test-infra存储库提出问题。

markdown不适用于title:smile:

@yagonobre ,我想解决这个问题。

您能告诉我在将所有常量都移到一个const之后如何测试此吗?

谢谢你。

谢谢@rumshenoy
您可以运行测试./build/run.sh make test WHAT=./cmd/kubeadm/app/cmd/ ,并尝试构建kubeadm ./build/run.sh make build kubeadm

/生命周期有效

此页面是否有帮助?
0 / 5 - 0 等级