Skip to content

Commit

Permalink
Merge pull request #233 from nmiyake/printfTrailingNewline
Browse files Browse the repository at this point in the history
Add trailing newlines in usage of "fmt.Printf"
  • Loading branch information
yundt authored Dec 20, 2018
2 parents 7c4e087 + b193893 commit 14aad5c
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion cmd/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ func picardImage() (string, error) {
}

}
fmt.Printf("Docker image digest: %s", sha)
fmt.Printf("Docker image digest: %s\n", sha)
return fmt.Sprintf("%s@%s", picardRepo, sha), nil
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/disabled.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func newDisabledCommand(config *settings.Config, command string) *cobra.Command
}

func disableCommand(opts disableOptions) {
fmt.Printf("`%s` is not available because this tool was installed using `%s`.", opts.command, PackageManager)
fmt.Printf("`%s` is not available because this tool was installed using `%s`.\n", opts.command, PackageManager)

if opts.command == "update" {
fmt.Println("Please consult the package manager's documentation on how to update the CLI.")
Expand Down
2 changes: 1 addition & 1 deletion cmd/namespace.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func createNamespace(opts namespaceOptions) error {
return err
}

fmt.Printf("Namespace `%s` created.", namespaceName)
fmt.Printf("Namespace `%s` created.\n", namespaceName)
fmt.Println("Please note that any orbs you publish in this namespace are open orbs and are world-readable.")
return nil
}
8 changes: 4 additions & 4 deletions cmd/orb.go
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ func validateOrb(opts orbOptions) error {
if opts.args[0] == "-" {
fmt.Println("Orb input is valid.")
} else {
fmt.Printf("Orb at `%s` is valid.", opts.args[0])
fmt.Printf("Orb at `%s` is valid.\n", opts.args[0])
}

return nil
Expand Down Expand Up @@ -466,12 +466,12 @@ func publishOrb(opts orbOptions) error {
return err
}

fmt.Printf("Orb `%s` was published.", ref)
fmt.Printf("Orb `%s` was published.\n", ref)
fmt.Println("Please note that this is an open orb and is world-readable.")

if references.IsDevVersion(version) {
fmt.Printf("Note that your dev label `%s` can be overwritten by anyone in your organization.", version)
fmt.Printf("Your dev orb will expire in 90 days unless a new version is published on the label `%s`.", version)
fmt.Printf("Note that your dev label `%s` can be overwritten by anyone in your organization.\n", version)
fmt.Printf("Your dev orb will expire in 90 days unless a new version is published on the label `%s`.\n", version)
}
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func updateBuildAgent() error {
return err
}

fmt.Printf("Latest build agent is version %s", latestSha256)
fmt.Printf("Latest build agent is version %s\n", latestSha256)

return nil
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func newVersionCommand(config *settings.Config) *cobra.Command {
opts.args = args
},
Run: func(_ *cobra.Command, _ []string) {
fmt.Printf("%s+%s", version.Version, version.Commit)
fmt.Printf("%s+%s\n", version.Version, version.Commit)
},
}
}

0 comments on commit 14aad5c

Please sign in to comment.