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 crawl #5

Draft
wants to merge 2 commits into
base: dejavu-main-go
Choose a base branch
from
Draft

Refactor crawl #5

wants to merge 2 commits into from

Conversation

marcelosousa
Copy link
Member

@marcelosousa marcelosousa commented Jul 9, 2021

This PR introduces the following changes:

  • Rename crawler.go to crawl.go
  • Rename url parameter to reqUrl in the Crawl method

View onReviewpad

Xavier-explore-dev
Xavier-explore-dev approved these changes Oct 26, 2021
@reviewpad reviewpad deleted a comment from Xavier-explore-dev Oct 26, 2021
@@ -4,19 +4,19 @@ import "fmt"

// First version as presented at:
// https://gist.github.com/harryhare/6a4979aa7f8b90db6cbc74400d0beb49#file-exercise-web-crawler-go
func Crawl(url string, depth int, fetcher Fetcher) {
func Crawl(reqUrl string, depth int, fetcher Fetcher) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this refactoring necessary?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because it makes the code more readable.

Copy link
Member Author

@marcelosousa marcelosousa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -4,19 +4,19 @@ import "fmt"

// First version as presented at:
// https://gist.github.com/harryhare/6a4979aa7f8b90db6cbc74400d0beb49#file-exercise-web-crawler-go
func Crawl(url string, depth int, fetcher Fetcher) {
func Crawl(reqUrl string, depth int, fetcher Fetcher) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because it makes the code more readable.

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.

2 participants