I like the example on randomNumbers.go but there's a lot of code repetition that makes the example not so clear. Perhaps there's a better way to process the arguments.
You are right that there is a lot of code repetition. However, proper argument processing with viper is explained at a different chapter.
The main idea here is to understand the logic of the program.
I like the example on
randomNumbers.go
but there's a lot of code repetition that makes the example not so clear. Perhaps there's a better way to process the arguments.