go-cmdtest
last updated: Jan 20, 2024
https://github.com/google/go-cmdtest
The cmdtest package simplifies testing of command-line interfaces. It provides a simple, cross-platform, shell-like language to express command execution. It can compare actual output with the expected output, and can also update a file with new "golden" output that is deemed correct.
A tool to help with snapshot testing golang CLIs