Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

How to Write Beautiful Golang CLI

Cloud Native Skunkworks via YouTube

Overview

Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Discover the definitive guide to building robust and extensible Golang-based Command Line Interfaces (CLIs) in this comprehensive 30-minute tutorial video. Learn how to create a CLI that multiple teams can contribute to, starting from theory and progressing to practical implementation. Follow along as the instructor demonstrates the creation of a successful CLI used by hundreds of engineers. Explore topics such as multi-contributor CLI development, Cobra and Cobra-CLI usage, structuring for extensibility, building functionality, and implementing Viper configuration. Gain insights into common mistakes and best practices while working with example code. Access the source code on GitHub for further study and experimentation.

Syllabus

Introduction
Multi-contributor CLI
Cobra
Cobra-CLI
Ready to build!
Structuring for extensibility
Moving new commands
Here is the trick...
Mistakes are good
Structured subcommand
Building some functionality
First working command
Disk usage command
Recap
Viper configuration
Implementing viper in an existing project
Conclusion

Taught by

Cloud Native Skunkworks

Reviews

Start your review of How to Write Beautiful Golang CLI

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.