A shell command that has grown into many special cases may be easier to maintain as a small program. Go is a programming language used for command-line tools and services; its toolchain can build an executable and run its tests.
Choose Go for a tool when its libraries and distribution approach fit your team. Begin with a program that reads a file rather than changes infrastructure. A module groups the code and records dependencies. Clear arguments, understandable errors and predictable output matter more than making the first program clever.
Try it in a lab
Create a small module that reads a local JSON file and summarizes a resource list. Separate parsing from printing, add table-driven tests and return an error for malformed input.
Check your understanding
Run the tests and build the binary. Demonstrate the behavior on an empty list and explain how the module records its dependencies.
Before you start
Keep credentials and platform-specific paths out of the sample. A successful compilation does not prove that external API assumptions are correct.
Read the official guide
Use the project documentation for version-specific commands and prerequisites. Record the versions and results of your own exercise. This page proposes a learning activity; it does not report a Kubedex test.
This is a newly written study reference at an address from the original Kubedex course outline. The original lesson was not recovered. It does not include course enrolment, progress tracking or a certificate.
Sources & further reading
Spotted something that needs another look?
Help improve this page →