Skip to content

Commit

Permalink
ineffassign: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alexisvisco committed May 19, 2024
1 parent 0f79649 commit f3131d2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/amigo/generate_migrations_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ func GenerateMigrationsFile(folder, pkg, filePath string) error {

// Write file
err = os.WriteFile(filePath, []byte(updatedContent), 0644)
if err != nil {
return fmt.Errorf("unable to write file %s: %w", filePath, err)
}

return nil
}
Expand Down Expand Up @@ -47,6 +50,9 @@ func updateMigrationsFileSlice(folder, pkg string) (string, error) {

return nil
})
if err != nil {
return "", fmt.Errorf("unable to walk through the folder: %w", err)
}

// sort the files
var keys []time.Time
Expand Down

0 comments on commit f3131d2

Please sign in to comment.