Cobra is both a library for creating powerful modern CLI applications as well as a program to generate applications and command files.
Viper is a complete configuration solution for go applications including 12 factor apps. It is designed to work within an application, and can handle all types of configuration needs and formats.
pflag is a drop-in replacement for Go’s flag package, implementing POSIX/GNU-style –flags.
7 common mistakes in Go and when to avoid them