Skip to content

Commit 0a59758

Browse files
authored
Merge pull request kubernetes#76549 from xichengliudui/ends-with-newline
Use fmt.printf() to end with a newline
2 parents 92918dc + 980de9d commit 0a59758

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

cmd/kubeadm/app/cmd/phases/workflow/doc_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func ExamplePhase() {
5050
}
5151

5252
// implement your phase logic...
53-
fmt.Printf("%v", d.Data())
53+
fmt.Printf("%v\n", d.Data())
5454
return nil
5555
},
5656
}
@@ -67,7 +67,7 @@ func ExamplePhase() {
6767
}
6868

6969
// implement your phase logic...
70-
fmt.Printf("%v", d.Data())
70+
fmt.Printf("%v\n", d.Data())
7171
return nil
7272
},
7373
}
@@ -91,7 +91,7 @@ func ExampleRunner_Run() {
9191
}
9292

9393
// implement your phase logic...
94-
fmt.Printf("%v", d.Data())
94+
fmt.Printf("%v\n", d.Data())
9595
return nil
9696
},
9797
}

cmd/kubeadm/app/phases/upgrade/postupgrade.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ func BackupAPIServerCertIfNeeded(cfg *kubeadmapi.InitConfiguration, dryRun bool)
174174
// Don't fail the upgrade phase if failing to backup kube-apiserver cert and key, just continue rotating the cert
175175
// TODO: We might want to reconsider this choice.
176176
if err := backupAPIServerCertAndKey(certAndKeyDir); err != nil {
177-
fmt.Printf("[postupgrade] WARNING: failed to backup kube-apiserver cert and key: %v", err)
177+
fmt.Printf("[postupgrade] WARNING: failed to backup kube-apiserver cert and key: %v\n", err)
178178
}
179179
return certsphase.CreateCertAndKeyFilesWithCA(
180180
&certsphase.KubeadmCertAPIServer,

cmd/kubeadm/app/util/arguments.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ func ParseArgumentListToMap(arguments []string) map[string]string {
6363
// Warn in all other cases, but don't error out. This can happen only if the user has edited the argument list by hand, so they might know what they are doing
6464
if err != nil {
6565
if i != 0 {
66-
fmt.Printf("[kubeadm] WARNING: The component argument %q could not be parsed correctly. The argument must be of the form %q. Skipping...", arg, "--")
66+
fmt.Printf("[kubeadm] WARNING: The component argument %q could not be parsed correctly. The argument must be of the form %q. Skipping...\n", arg, "--")
6767
}
6868
continue
6969
}

0 commit comments

Comments
 (0)