Repository: kubernetes/kubernetes
File: cmd/kubeadm/app/cmd/phases/init/data.go (Go)

Code before:

// testInitData must satisfy InitData.
var _ InitData = &testInitData{}

func (t *testInitData) UploadCerts() bool                                    { return false }
func (t *testInitData) CertificateKey() string                               { return "" }
func (t *testInitData) SetCertificateKey(key string)                         {}
func (t *testInitData) SkipCertificateKeyPrint() bool                        { return false }
func (t *testInitData) Cfg() *kubeadmapi.InitConfiguration                   { return nil }
func (t *testInitData) DryRun() bool                                         { return false }
func (t *testInitData) SkipTokenPrint() bool                                 { return false }
func (t *testInitData) IgnorePreflightErrors() sets.Set[string]              { return nil }
func (t *testInitData) CertificateWriteDir() string                          { return "" }
func (t *testInitData) CertificateDir() string                               { return "" }
func (t *testInitData) KubeConfig() (*clientcmdapi.Config, error)            { return nil, nil }
func (t *testInitData) KubeConfigDir() string                                { return "" }
func (t *testInitData) KubeConfigPath() string                               { return "" }
func (t *testInitData) ManifestDir() string                                  { return "" }
func (t *testInitData) KubeletDir() string                                   { return "" }
func (t *testInitData) ExternalCA() bool                                     { return false }
func (t *testInitData) OutputWriter() io.Writer                              { return nil }
func (t *testInitData) Client() (clientset.Interface, error)                 { return nil, nil }
func (t *testInitData) WaitControlPlaneClient() (clientset.Interface, error) { return nil, nil }
func (t *testInitData) Tokens() []string                                     { return nil }
func (t *testInitData) PatchesDir() string                                   { return "" }



Review comment (bug):
you need to remove this empty line

```
diff ./cmd/kubeadm/app/cmd/phases/init/data.go.orig ./cmd/kubeadm/app/cmd/phases/init/data.go
--- ./cmd/kubeadm/app/cmd/phases/init/data.go.orig
+++ ./cmd/kubeadm/app/cmd/phases/init/data.go
@@ -79,4 +79,3 @@
 func (t *testInitData) WaitControlPlaneClient() (clientset.Interface, error) { return nil, nil }
 func (t *testInitData) Tokens() []string                                     { return nil }
 func (t *testInitData) PatchesDir() string                                   { return "" }
-
```

gofmt failed in CI.

but keep the commits squashed to 1 please

Code after:

// testInitData must satisfy InitData.
var _ InitData = &testInitData{}

func (t *testInitData) UploadCerts() bool                                    { return false }
func (t *testInitData) CertificateKey() string                               { return "" }
func (t *testInitData) SetCertificateKey(key string)                         {}
func (t *testInitData) SkipCertificateKeyPrint() bool                        { return false }
func (t *testInitData) Cfg() *kubeadmapi.InitConfiguration                   { return nil }
func (t *testInitData) DryRun() bool                                         { return false }
func (t *testInitData) SkipTokenPrint() bool                                 { return false }
func (t *testInitData) IgnorePreflightErrors() sets.Set[string]              { return nil }
func (t *testInitData) CertificateWriteDir() string                          { return "" }
func (t *testInitData) CertificateDir() string                               { return "" }
func (t *testInitData) KubeConfig() (*clientcmdapi.Config, error)            { return nil, nil }
func (t *testInitData) KubeConfigDir() string                                { return "" }
func (t *testInitData) KubeConfigPath() string                               { return "" }
func (t *testInitData) ManifestDir() string                                  { return "" }
func (t *testInitData) KubeletDir() string                                   { return "" }
func (t *testInitData) ExternalCA() bool                                     { return false }
func (t *testInitData) OutputWriter() io.Writer                              { return nil }
func (t *testInitData) Client() (clientset.Interface, error)                 { return nil, nil }
func (t *testInitData) WaitControlPlaneClient() (clientset.Interface, error) { return nil, nil }
func (t *testInitData) Tokens() []string                                     { return nil }
func (t *testInitData) PatchesDir() string                                   { return "" }