Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactored internal/collector/depsdev/source #324

Merged
merged 2 commits into from
Feb 8, 2023

Conversation

nathannaveen
Copy link
Contributor

@nathannaveen nathannaveen commented Feb 7, 2023

  • DefaultDatasetName wasn't used, so I removed it.
  • I also replaced all of the return err with return fmt.Errorf() because it's considered good practice in Go to use fmt.Errorf() instead of just returning err as it provides more informative error messages. The fmt.Errorf() function formats a string into an error, allowing for added context and information that can aid in debugging and troubleshooting. On the other hand, returning just err without any extra information can make it harder to comprehend the error's cause and solution. Furthermore, using a formatted error message enhances error handling and debugging consistency.

Signed-off-by: nathannaveen 42319948+nathannaveen@users.noreply.github.com

nathannaveen and others added 2 commits February 6, 2023 17:52
- `DefaultDatasetName` wasn't used, so I removed it.
- I also replaced all of the `return err` with `return fmt.Errorf()` because it's considered good practice in Go to use fmt.Errorf() instead of just returning "err" as it provides more informative error messages. The fmt.Errorf() function formats a string into an error, allowing for added context and information that can aid in debugging and troubleshooting. On the other hand, returning just "err" without any extra information can make it harder to comprehend the error's cause and solution. Furthermore, using a formatted error message enhances error handling and debugging consistency.

Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>
@calebbrown calebbrown merged commit fd5feb1 into ossf:main Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants