diff --git a/cmd/generate/config/config.go b/cmd/generate/config/config.go index 4742544..c543b2a 100644 --- a/cmd/generate/config/config.go +++ b/cmd/generate/config/config.go @@ -83,13 +83,13 @@ func run(opts *Options) error { // Open repo repo, err := git.PlainOpen(opts.path) if err != nil { - return fmt.Errorf("Error opening repo: %w", err) + return fmt.Errorf("error opening repo: %w", err) } commitIter, err := repo.CommitObjects() if err != nil { - return fmt.Errorf("Error opening repo commits: %w", err) + return fmt.Errorf("error opening repo commits: %w", err) } var uniqueEmails []string @@ -110,14 +110,14 @@ func run(opts *Options) error { }) if err != nil { - return fmt.Errorf("Error iterating over repo commits: %w", err) + return fmt.Errorf("error iterating over repo commits: %w", err) } // INTERACTIVE: per unique email, set a name (existing or new or ignore) if opts.isInteractive { program := tea.NewProgram(initialModel(opts, uniqueEmails)) if _, err := program.Run(); err != nil { - return fmt.Errorf("Error running interactive mode: %w", err) + return fmt.Errorf("error running interactive mode: %w", err) } } else { // generate an output file @@ -127,12 +127,12 @@ func run(opts *Options) error { homeDir, _ := os.UserHomeDir() err := generateOutputFile(filepath.Join(homeDir, ".sauced.yaml"), attributionMap) if err != nil { - return fmt.Errorf("Error generating output file: %w", err) + return fmt.Errorf("error generating output file: %w", err) } } else { err := generateOutputFile(filepath.Join(opts.outputPath, ".sauced.yaml"), attributionMap) if err != nil { - return fmt.Errorf("Error generating output file: %w", err) + return fmt.Errorf("error generating output file: %w", err) } } } @@ -256,12 +256,12 @@ func runOutputGeneration(opts *Options, attributionMap map[string][]string) tea. homeDir, _ := os.UserHomeDir() err := generateOutputFile(filepath.Join(homeDir, ".sauced.yaml"), attributionMap) if err != nil { - return fmt.Errorf("Error generating output file: %w", err) + return fmt.Errorf("error generating output file: %w", err) } } else { err := generateOutputFile(filepath.Join(opts.outputPath, ".sauced.yaml"), attributionMap) if err != nil { - return fmt.Errorf("Error generating output file: %w", err) + return fmt.Errorf("error generating output file: %w", err) } } diff --git a/cmd/generate/config/output.go b/cmd/generate/config/output.go index f5a06aa..f8db065 100644 --- a/cmd/generate/config/output.go +++ b/cmd/generate/config/output.go @@ -11,7 +11,7 @@ import ( func generateOutputFile(outputPath string, attributionMap map[string][]string) error { file, err := os.Create(outputPath) if err != nil { - return fmt.Errorf("Error creating %s file: %w", outputPath, err) + return fmt.Errorf("error creating %s file: %w", outputPath, err) } defer file.Close() @@ -22,13 +22,13 @@ func generateOutputFile(outputPath string, attributionMap map[string][]string) e yaml, err := utils.OutputYAML(config) if err != nil { - return fmt.Errorf("Failed to turn into YAML: %w", err) + return fmt.Errorf("failed to turn into YAML: %w", err) } _, err = file.WriteString(yaml) if err != nil { - return fmt.Errorf("Failed to turn into YAML: %w", err) + return fmt.Errorf("failed to turn into YAML: %w", err) } return nil