Testing colStats

Learn how to write the test cases for the colStats tool.

Updating the main_test.go file

In the main_test.go file, we add the package definition and the import section.

For these tests, we’ll use:

  • The bytes package to create buffers to capture the output.
  • The errors package to verify errors.
  • The os package to validate operating system errors.
  • The testing package, which is required to execute tests.

Get hands-on with 1200+ tech skills courses.