Creating Your OWN Command in Go (golang) Using Cobra [The Complete Getting Started Guide] 2020



Creating Your OWN Command in Go (golang) Using Cobra [The Complete Getting Started Guide] 2020

Creating Your OWN Command in Go (golang) Using Cobra [The Complete Getting Started Guide] 2020

Creating something for yourself, like an open-source project, provides SO many benefits to you. It helps you learn a language. One of the toughest things for a new developer or someone learning a new programming language is knowing where to go from the beginner-level course or the “Hello World”. Building an open-source project solves that for you.

Another great benefit it is helps a TON on your resume. You can point a new employer or someone you’re interviewing with to your GitHub to showcase the project. It’ll let everyone know your skills.

Building a command is a great place to start. Cobra, a Go package, helps you get started in building a command-line tool. It initiates a package for you, gives you a place to create flags, and execution for the code.

In this video, you’ll learn how to:
1. Start using the Cobra package
2. Install the Cobra package
3. Initiate a new Cobra package
4. Creating your VERY OWN command
5. Create flags for your command
6. Build and install the command
7. Run the command and see it in action

Let’s JUMP RIGHT IN!

Twitter: https://twitter.com/TheNJDevOpsGuy
Blog: https://www.clouddev.engineering/

#golang #development #100DaysOfCode

Comments are closed.