Tree in Go

Exercise: Solve this exercise in Go with test cases.
Tree exercise
Labels: Intermediate
Time to complete: 4-5 days
What will you learn:
  • Basics of CLI building in Go, parsing CLI flags, cobra library
  • Reading nested directories, computing stats from a directory structure
  • Writing table-driven tests
  • Tree data structure and how to represent that in Go code
  • Converting a struct into custom JSON and XML format (when implementing the last few stories of the problem statement)
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 patronizing me.