The viper Package: Using Command-Line Flags
Let’s learn about the viper package.
We'll cover the following...
Now that we know about working with JSON, XML, and YAML data in Go, we are ready to learn about the viper package.
The flag package
Flags are specially formatted strings that are passed into a program to control its behavior. Dealing with flags on our own might become very frustrating if we want to support multiple flags and options. Go offers the flag package for working with command-line options, parameters, and flags.
The viper package
Although flag can do many things, it is not as capable as other external Go packages. Thus, if we are developing simple UNIX system command-line utilities, we might find the flag package very interesting and useful. Of course, creating simple command-line utilities ...