HomeCoursesWrite Professional Command-line Programs in Go
Updated 2 weeks ago
AI-powered learning
Save

Write Professional Command-line Programs in Go

Gain insights into writing professional command-line programs in Go. Delve into structuring Go programs, writing idiomatic code, testing effectively, and impressing users and managers.

4.7
63 lessons
28h 30min
Created by Gigi Sayfan
Write Professional Command-line Programs in Go
What's included
  • 63 lessons across 7 modules
  • 24 quizzes with instant feedback
  • AI Tutor on every lesson
Who wrote it
Gigi Sayfan
I'm the DevOps team manager at Helix - a bioinformatics and genomics start-up, author of several books on Kubernetes and Go as well as hundreds of technical articles. I program professionally for 20+ years and still amazed when anything actually works.

I'm a long time software developer. I started programming in the early 80s (yes, the previous millennium) on the Dragon 32 and I never grew out of it. I was born and raised in Israel, served in the IDF (Israeli Defense forces) for three and a half years in the paratroopers and special forces. I even got shot in the leg during my military service, but don't worry I healed completely and even ran a half marathon a few months later. I studied computer science at Tel-Aviv university and got an MBA too. I started developing software professionally in 1995 and I'm still at it. I'm currently a principal software architect at Helix (http://www.helix.com) - Where we build a consumer genomics and bioinformatics platform. I've had a very diverse career, mostly working for startup companies where I wore multiple hats, often at the same time. I always follow my passion and try to work in a new interesting domain. Here are some of the domains and industries I contributed to: - instant messaging (when it just started) - morphing - chip fabrication process control - embedded multimedia applications for game consoles (Sony PlayStation) - brain-inspired machine learning (Numenta) - custom browser development (Rockmelt) - web services for 3D distributed game platforms (Roblox), - IoT sensors (Aclima) - virtual reality (stealth startup) In addition to working in very different domains I also traveled across the tech stack from Windows desktop applications, through cross-platform engine to cloud-based distributed systems, and databases. Here some of the programming languages I used professionally: - Go, - Python, - C, - C++, - C#, - Java, - Delphi, - JavaScript - Cobol - PowerBuilder I also programmed against many operating systems (often at a very low-level): - Windows (3.11 through 7) - Linux (so many distros) - macOS - Lynx (embedded) - Sony Playstation These days it's all about cloud-native computing with Docker and Kubernetes. I've deployed production systems on AWS, GCE, Azure and even Alibaba cloud. Outside of work, I have a lovely wife and 3 kids. We love traveling, hiking, sports (weight lifting, Crossfit, martial arts) and board games (Settlers of Catan, Dominion, Seven Wonders, Puerto Rico). I used to play a lot of basketball and do Crossfit. These days my athletic outlet is Brazilian Jiu Jitsu. I also spend a lot of time learning and sharing what I've learned with the world through open source (http://github.com/the-gigi), articles and books.

Join 3.1 million developers at

What You'll Learn

  • Identify CLI inputs/outputs: commands, flags, args, streams, piping, and exit codes
  • Refactor a Go CLI into modular packages and a cmd/ structure using Go modules
  • Write and run unit tests with Go testing, including table-driven and parallel tests
  • Create BDD unit and end-to-end tests with Ginkgo/Gomega and generate coverage profiles
  • Build structured CLIs with Cobra using root commands, subcommands, and persistent/local flags
  • Implement configuration with Viper across flags, env vars, files, and remote sources with precedence
  • Automate builds and releases using go build flags, GitHub Actions, Docker, and Makefiles

Learning Roadmap

63 Lessons24 Quizzes

2.

Restructuring multi-git

Restructuring multi-git

Unpack the core of restructuring multi-git for better code organization and collaboration.

3.

Testing 1,2,3...

Testing 1,2,3...

11 Lessons

11 Lessons

Examine Go's testing capabilities, tools like Ginkgo and Gomega, and comprehensive e2e testing.

4.

Adding Smart Command-Line Parsing

Adding Smart Command-Line Parsing

13 Lessons

13 Lessons

Grasp the fundamentals of using Cobra for structured command-line applications in Go.

5.

Adding Advanced Configuration

Adding Advanced Configuration

13 Lessons

13 Lessons

Harness advanced configuration techniques in Go, using Viper and Cobra for flexible and efficient command-line programs.

6.

Adding Bells and Whistles

Adding Bells and Whistles

13 Lessons

13 Lessons

See how it works to enhance Go command-line programs with builds, linking, CI/CD, and Docker.
Certificate of Completion
Showcase your accomplishment by sharing your certificate of completion.
Gigi SayfanWrite Professional Command-line Programsin GoCourse Author

Show License and Attributions

About this course
WHY I WROTE THIS COURSE
In this course you will learn why Go is an awesome language for writing command-line programs. You will learn how to structure your Go programs, how to write idiomatic Go code, how to test your programs and how to amaze your users, peers and managers. The focus is on command-line programs in order to keep the course down to earth, but most of the principles and best practices you will learn apply to any Go program.
ABOUT THE AUTHOR

Gigi Sayfan

I'm the DevOps team manager at Helix - a bioinformatics and genomics start-up, author of several books on Kubernetes and Go as well as hundreds of technical articles. I program professionally for 20+ years and still amazed when anything actually works.

Learn more about Gigi

Trusted by 3.1 million developers working at companies

These are high-quality courses. Trust me the price is worth it for the content quality. Educative came at the right time in my career. I'm understanding topics better than with any book or online video tutorial I've done. Truly made for developers. Thanks

A

Anthony Walker

@_webarchitect_

Just finished my first full #ML course: Machine learning for Software Engineers from Educative, Inc. ... Highly recommend!

E

Evan Dunbar

ML Engineer

You guys are the gold standard of crash-courses... Narrow enough that it doesn't need years of study or a full blown book to get the gist, but broad enough that an afternoon of Googling doesn't cut it.

S

Software Developer

Carlos Matias La Borde

I spend my days and nights on Educative. It is indispensable. It is such a unique and reader-friendly site

S

Souvik Kundu

Front-end Developer

Your courses are simply awesome, the depth they go into and the breadth of coverage is so good that I don't have to refer to 10 different websites looking for interview topics and content.

V

Vinay Krishnaiah

Software Developer

FOR TEAMS

Interested in this course for your business or team?

Unlock this course (and 1,000+ more) for your entire org with DevPath

Built for 10x Developers

No Passive Learning
Learn by building with project-based lessons and in-browser code editor
Learn by DoingLearn by Doing
Personalized Roadmaps
The platform adapts to your strengths & skills gaps as you go
Learn by DoingLearn by Doing
Future-proof Your Career
Get hands-on with in-demand skills
Learn by DoingLearn by Doing
AI Code Mentor
Write better code with AI feedback, smart debugging, and "Ask AI"
Learn by DoingLearn by Doing
Learn by DoingLearn by Doing
MAANG+ Interview Prep
AI Mock Interviews simulate every technical loop at top companies
Learn by DoingLearn by Doing

Free Resources