pflag

A third-party Go library that replaces the standard flag package with GNU-style options, such as --verbose and bundled -v short flags.

In more detail

Cobra uses it underneath. Choose it when users expect the double-dash long options common in Linux tools.

Related terms

Taught in

References