Mastering Go Application Design: Building a Basic CLI from Scratch with Only the Standard Library

Golang has built in support for creating CLI applications that accept command line flags and arguments. The “flag” package has convenient methods for reading in options as typed variables, it also supports creating default help text. CLI applications are useful for creating developer tooling, especially when you can import critical parts of the codebase into a simple cli. Playground: