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

Refactor to dry up code #100

Merged
merged 8 commits into from
Jul 17, 2023
Merged

Refactor to dry up code #100

merged 8 commits into from
Jul 17, 2023

Conversation

lavafroth
Copy link
Contributor

Changes

  • Use switch statement on interface{}s instead of reflection to figure out types (bumped go version to 1.20)
  • Avoid goto statements when possible
  • Use mapset library for blocklists and looking up previously seen URLs
  • Lazily construct structures when errors are involved
  • Set a log level when parsing configs to avoid checking the verbose flag for every logrus log invocation
  • Scope loop variables to respective blocks
  • Minor improvements to conditional statements that employ string formatting

@lc
Copy link
Owner

lc commented Jul 17, 2023

Thanks for the PR! Looks great

@lc lc merged commit 6ce890f into lc:master Jul 17, 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