Kubeadm: すべての定数を単一の `const(`

作成日 2019年02月11日  ·  4コメント  ·  ソース: kubernetes/kubeadm

ファイルcmd/kubeadm/app/cmd/options/constant.goすべてのconstを単一の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.
- 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"
+)

/種類のクリーンアップ
/ priorityバックログ
/助けて
/ good-first-issue

good first issue help wanted kincleanup lifecyclactive prioritbacklog

最も参考になるコメント

こんにちは@yagonobre 、私はこの問題に取り組みたいと思います。

すべての定数を1つのconst移動し終えた後、これをテストする方法を教えてください。

ありがとうございました。

全てのコメント4件

@yagonobre
このリクエストは、新しい寄稿者に適しているとマークされています。

リクエストがここに記載されて

このリクエストがこれらの要件を満たさなくなった場合は、ラベルを削除できます
/remove-good-first-issueコマンドでコメントします。

対応して、この

ファイルcmd/kubeadm/app/cmd/options/constant.goすべてのconstを単一の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.
- 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"
+)

/種類のクリーンアップ
/ priorityバックログ
/助けて
/ good-first-issue

PRコメントを使用して私とやり取りするための手順は、こちらから入手できkubernetes / test-infraリポジトリに対して問題を

マークダウンはタイトルでは機能しません:smile:

こんにちは@yagonobre 、私はこの問題に取り組みたいと思います。

すべての定数を1つのconst移動し終えた後、これをテストする方法を教えてください。

ありがとうございました。

ありがとう@rumshenoy
テスト./build/run.sh make test WHAT=./cmd/kubeadm/app/cmd/を実行し、kubeadm ./build/run.sh make build kubeadmビルドを試みることができます

/ライフサイクルアクティブ

このページは役に立ちましたか?
0 / 5 - 0 評価