Fix indentation/spacing in comments to render correctly in godoc

This commit is contained in:
Jordan Liggitt
2022-12-17 17:31:05 -05:00
parent 2ca74f2885
commit 78cb3862f1
59 changed files with 163 additions and 216 deletions

View File

@@ -89,8 +89,7 @@ type initData struct {
// newCmdInit returns "kubeadm init" command.
// NB. initOptions is exposed as parameter for allowing unit testing of
//
// the newInitOptions method, that implements all the command options validation logic
// the newInitOptions method, that implements all the command options validation logic
func newCmdInit(out io.Writer, initOptions *initOptions) *cobra.Command {
if initOptions == nil {
initOptions = newInitOptions()

View File

@@ -156,8 +156,7 @@ type joinData struct {
// newCmdJoin returns "kubeadm join" command.
// NB. joinOptions is exposed as parameter for allowing unit testing of
//
// the newJoinData method, that implements all the command options validation logic
// the newJoinData method, that implements all the command options validation logic
func newCmdJoin(out io.Writer, joinOptions *joinOptions) *cobra.Command {
if joinOptions == nil {
joinOptions = newJoinOptions()

View File

@@ -38,15 +38,13 @@ var joinCommandTemplate = template.Must(template.New("join").Parse(`` +
))
// GetJoinWorkerCommand returns the kubeadm join command for a given token and
//
// Kubernetes cluster (the current cluster in the kubeconfig file)
// Kubernetes cluster (the current cluster in the kubeconfig file)
func GetJoinWorkerCommand(kubeConfigFile, token string, skipTokenPrint bool) (string, error) {
return getJoinCommand(kubeConfigFile, token, "", false, skipTokenPrint, false)
}
// GetJoinControlPlaneCommand returns the kubeadm join command for a given token and
//
// Kubernetes cluster (the current cluster in the kubeconfig file)
// Kubernetes cluster (the current cluster in the kubeconfig file)
func GetJoinControlPlaneCommand(kubeConfigFile, token, key string, skipTokenPrint, skipCertificateKeyPrint bool) (string, error) {
return getJoinCommand(kubeConfigFile, token, key, true, skipTokenPrint, skipCertificateKeyPrint)
}

View File

@@ -160,8 +160,7 @@ func GetNodeRegistration(kubeconfigFile string, client clientset.Interface, node
// getNodeNameFromKubeletConfig gets the node name from a kubelet config file
// TODO: in future we want to switch to a more canonical way for doing this e.g. by having this
//
// information in the local kubelet config.yaml
// information in the local kubelet config.yaml
func getNodeNameFromKubeletConfig(fileName string) (string, error) {
// loads the kubelet.conf file
config, err := clientcmd.LoadFromFile(fileName)