Skip to content

Commit

Permalink
reformat the error message
Browse files Browse the repository at this point in the history
  • Loading branch information
medmes committed Nov 28, 2024
1 parent 86c11d6 commit 2cac7e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/service/filegenerator/filegenerator.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (s *Service) GenerateFile(out iotools.Out, path string, args types.KeyValue

func (s *Service) writeFile(content, path string) error {
if err := s.fileWriter.WriteFile(path, content); err != nil {
return fmt.Errorf("%w at '%s': %w", ErrWritingFile, path, err)
return fmt.Errorf("file path: %s, %w: %w", path, err, ErrWritingFile)
}

return nil
Expand Down
2 changes: 1 addition & 1 deletion internal/service/scaffold/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func (opts Options) validateDirectory() error {

func (opts Options) validateModuleName() error {
if err := validation.ValidateModuleName(opts.ModuleName); err != nil {
return fmt.Errorf("opts.ModuleName: %w: %w", commonerrors.ErrInvalidOption, err)
return fmt.Errorf("opts.ModuleName: %w", err)
}

return nil
Expand Down

0 comments on commit 2cac7e9

Please sign in to comment.