Skip to content
This repository has been archived by the owner on Mar 22, 2022. It is now read-only.

Commit

Permalink
Merge pull request #59 from nywilken/refactor-fprintf-calls
Browse files Browse the repository at this point in the history
Replace calls to Fprintf with Fprintln
  • Loading branch information
nywilken authored Aug 22, 2017
2 parents ff2edf6 + f44428b commit fefea5d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions cmd/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func generateExampleText() string {
func runGenerate(cmd *cobra.Command, args []string) {
path, err := filepath.Abs(filepath.FromSlash(args[0]))
if err != nil {
fmt.Fprintf(os.Stderr, err.Error())
fmt.Fprintln(os.Stderr, err.Error())
os.Exit(1)
}
root := filepath.Dir(path)
Expand All @@ -62,7 +62,7 @@ func runGenerate(cmd *cobra.Command, args []string) {
} else {
track, err := track.New(path)
if err != nil {
fmt.Fprintf(os.Stderr, err.Error())
fmt.Fprintln(os.Stderr, err.Error())
os.Exit(1)
}
exercises = track.Exercises
Expand All @@ -82,7 +82,7 @@ func runGenerate(cmd *cobra.Command, args []string) {
}

if err := errs.ErrorOrNil(); err != nil {
fmt.Fprintf(os.Stderr, "%s\n", err.Error())
fmt.Fprintln(os.Stderr, err.Error())
os.Exit(1)
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var versionCmd = &cobra.Command{
}

func runVersion(cmd *cobra.Command, args []string) {
fmt.Printf("%s v%s\n", binaryName, Version)
fmt.Printf("%s version %s\n", binaryName, Version)
}

func init() {
Expand Down

0 comments on commit fefea5d

Please sign in to comment.