将文件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
@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
/生命周期有效
最有用的评论
嗨@yagonobre ,我想解决这个问题。
您能告诉我在将所有常量都移到一个
const
之后如何测试此吗?谢谢你。