Skip to content

Conversation

EduKav1813
Copy link

The current version's tests didn't work for me at the end of the section. I propose a fix.

The exact wording or maybe even the implementation may be improved/modified, but I think this should be covered in the tutorial.

@@ -14,8 +14,9 @@ func CheckWebsites(wc WebsiteChecker, urls []string) map[string]bool {
resultChannel := make(chan result)

for _, url := range urls {
u := url
Copy link

Choose a reason for hiding this comment

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

It be better to add a Parameter in the function instead declaring the variable . Like

go func(url string) {
			resultChannel <- result{url, wc(url)}
		}(url)

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