Command Line Tool in Go (for Linux/Windows/MacOs)



Command Line Tool in Go (for Linux/Windows/MacOs)

Command Line Tool in Go (for Linux/Windows/MacOs)

In this video you can see, how to create command line tool using Go and Cobra. Also we compile it for different platforms.

Cobra package on GH – https://github.com/spf13/cobra
Go – https://go.dev

Timestamps:
(0:00) Famous things created using GO
(0:10) What we are gonna do
(0:17) Go – cross-platform language
(0:30) Main advantages of language
(0:50) Install Go and Cobra (for Linux)
(1:16) Initialize Go Module and create project structure
(1:48) Adding commands using cobra-cli
(2:22) Flags for commands
(3:08) Write weather in terminal tool
(4:21) Compiling program for Linux and Windows systems

#go #programming #golang #linux #cli #command #windows