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: https://go.dev/play/p/UHuXCNgQB8j package main import "flag" var ( // define the command line arguments customerID *int = flag....