πŸ“™

Word count in Go

Exercise: Solve this exercise in Go with test cases.
πŸ“™
Word count exercise
Labels: Beginner
Time to complete: 3-4 days
What will you learn:
  • Basics of CLI building in Go, parsing CLI flags, cobra library
  • File reading, listing files in a directory, dealing with a large number of files
  • Writing table-driven tests
  • Power of interfaces in Go (io.Reader interface)
  • Using channels and goroutines to efficiently process multiple files in parallel, mutex, fan-in pattern for goroutines and channels.
How to evaluate your solution:
Actual Solution:
  • Don’t look at the solution unless you have you. Otherwise, you’re not getting much value from the bootcamp.
I know what I am doing; stop patronising me.
Resources:
Β