You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the last line of a file does not terminate with the new line character the program fails to include that line's content into the count of number of words and characters. You can take a look at my fixes in these two commits.
I'm glad to help. BTW, after fixing the bug my next change was to move the compilation of the regexp expression to the main body of the program so that it is done only once; there is no point in doing it over and over again. That change alone sped up the program substantially!
Details of this update, and my final "speedy" version of the program are available from my Gitlab repo.
Cheers,
--
Pedro
On Jul 9 2018, at 3:04 pm, Mihalis Tsoukalos ***@***.***> wrote:
Made the PR in #4 ***@***.***/0?redirect=https%3A%2F%2Fgithub.com%2FPacktPublishing%2FGo-Systems-Programming%2Fpull%2F4&recipient=cmVwbHkrMDE1MzVmNWM4ZTk3ZTZjMDlmZDI5MjU0NTJhMmVmYTIwOWQ0ZGJkNGUzZmI0YWQ1OTJjZjAwMDAwMDAxMTc1YjczZDE5MmExNjljZTE0M2NlNzhiQHJlcGx5LmdpdGh1Yi5jb20%3D)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub ***@***.***/1?redirect=https%3A%2F%2Fgithub.com%2FPacktPublishing%2FGo-Systems-Programming%2Fissues%2F3%23issuecomment-403586859&recipient=cmVwbHkrMDE1MzVmNWM4ZTk3ZTZjMDlmZDI5MjU0NTJhMmVmYTIwOWQ0ZGJkNGUzZmI0YWQ1OTJjZjAwMDAwMDAxMTc1YjczZDE5MmExNjljZTE0M2NlNzhiQHJlcGx5LmdpdGh1Yi5jb20%3D), or mute the thread ***@***.***/2?redirect=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAVNfXNwB2AJxoEIBnHmorVwdrqidL6GDks5uE6lRgaJpZM4VIFEk&recipient=cmVwbHkrMDE1MzVmNWM4ZTk3ZTZjMDlmZDI5MjU0NTJhMmVmYTIwOWQ0ZGJkNGUzZmI0YWQ1OTJjZjAwMDAwMDAxMTc1YjczZDE5MmExNjljZTE0M2NlNzhiQHJlcGx5LmdpdGh1Yi5jb20%3D).
When the last line of a file does not terminate with the new line character the program fails to include that line's content into the count of number of words and characters. You can take a look at my fixes in these two commits.
https://gitlab.com/pirivan/golearn/commit/dfeb4b856fb135b292590de6ed2f403768be6a65
https://gitlab.com/pirivan/golearn/commit/2459b220e486dbf85db82f30b5d1e49523c3bfa0
The text was updated successfully, but these errors were encountered: