Wrapping Up

Powerful Command-Line Applications in Go — by Ricardo Gerardi (83 / 127)

The Pragmatic Programmers
The Pragmatic Programmers

--

👈 Exercises | TOC | Chapter 8 Talking to REST APIs 👉

You used Cobra to create a command-line application that looks professional. Your application includes detailed help and usage information, POSIX-compatible flags, configuration files, command completion, and documentation. You also used the Cobra generator to create the boilerplate code for these features allowing you to focus on your business logic to create a functional TCP port scanner for your network.

In the next chapter, you’ll use Cobra again to develop a command-line application that connects to web services using the REST standard.

Footnotes

[40] https://github.com/spf13/cobra

[41] https://en.wikipedia.org/wiki/POSIX

[42] https://github.com/spf13/viper

[43] https://nmap.org/

[44] https://github.com/spf13/pflag

[45] https://gitforwindows.org/

[46] https://docs.microsoft.com/en-us/windows/wsl/install-win10

[47] https://godoc.org/github.com/spf13/cobra#Command.GenPowerShellCompletion

[48] https://github.com/spf13/cobra/tree/master/doc

Copyright © 2021, The Pragmatic Bookshelf.

👈 Exercises | TOC | Chapter 8 Talking to REST APIs 👉

Powerful Command-Line Applications in Go by Ricardo Gerardi can be purchased in other book formats directly from the Pragmatic Programmers. If you notice a code error or formatting mistake, please let us know here so that we can fix it.

--

--

The Pragmatic Programmers
The Pragmatic Programmers

We create timely, practical books and learning resources on classic and cutting-edge topics to help you practice your craft and accelerate your career.