tdg5 (1) [Avatar] Offline

I came across the following suggestions while reading the previous edition book. I apologize, but I have not had an opportunity to cross reference them against the latest edition.

"Before we dive into the code let's review the architecture behind the program and see how searching all the different feeds is accomplish:" - Should be "accomplished".

"Then on line 32 we make a call to the Decode method off the value returned by the NewDecoder function from the json package" - Should be "of".

"When your Go program has an main() function and belongs to a package called main, you're instructing the compiler to build an executable program." - Should be "a".

"Once you start cranking out awesome Go code, you're probably going to want to share them with the rest of the Go community." - Debatable, but "it" seems more appropriate to me.

"The order of the values do matter in this case and need to match the order of the fields in the struct declaration" - Perhaps debatable, but I interpret "order of the values" as the subject and as a singular entity. As such, I think "does" is more appropriate.

"Does adding or removing something from a value of this type need to create a new value or mutate the existing one." - This sentence is postured as a question and so it seems to me that a question mark would be more appropriate.

"The decision to use a value or pointer receiver should not being based on whether the method is mutating the receiving value or not." - Should be "be".

"// Acquire retrieves a resource from the pool" - Extra or incorrect spacing in comment.

"// If the pool is already close, don't do anything." - Should be "closed".

"// Close implements the io.Closer interface so dbConnection can be managed by the pool" - I would use the word "fulfills" here. Alternatively, because I've more often heard of types implementing an interface, not methods, I might rephrase as "// dbConnection implements the io.Closer interface so it can be managed by the pool."

"This is turn causes the goroutine to decrement the WaitGroup count and terminate." - Should be "in".

"This means that multiple goroutines at the same time can call these functions from the same logger value without the writes colliding with each other." - Awkward phrasing. Consider the following instead: "This means that multiple goroutines can call these functions from the same logger value at the same time without the writes colliding with each other."

If I can offer any clarification on any of these suggestions, please let me know. I hope this helps!
Bill Kennedy (69) [Avatar] Offline
Thank you for this. I have sent them to the editor for review. smilie