Skip to content

Commit

Permalink
fix typo in message if only one file was saved
Browse files Browse the repository at this point in the history
  • Loading branch information
roblaszczak committed Jun 3, 2023
1 parent c167e9c commit d2b75ba
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion trainings/files/write.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ func (f Files) WriteExerciseFiles(filesToCreate []*genproto.File, trainingRootFs
fmt.Fprintf(f.stdout, color.GreenString("+")+" %s (%d lines)\n", savedFileRelativePath, file.Lines)
}

if len(savedFiles) > 0 {
if len(savedFiles) == 1 {
fmt.Fprintf(f.stdout, "Exercise ready, 1 file saved.\n\n")
} else if len(savedFiles) > 0 {
fmt.Fprintf(f.stdout, "Exercise ready, %d files saved.\n\n", len(savedFiles))
} else {
fmt.Fprintf(f.stdout, "Exercise ready.\n\n")
Expand Down

0 comments on commit d2b75ba

Please sign in to comment.