Skip to content

Latest commit

 

History

History
42 lines (25 loc) · 1.2 KB

README.md

File metadata and controls

42 lines (25 loc) · 1.2 KB

go-cobra-cli-playground

how to create cli apps (golang: cobra + viper) ?

how to create something like ... ?

e.g.: $ kubectl describe deployment <DEPLOYMENT_NAME> -o yaml

install golang (osx)

build cli-apps in go (cobra + viper)

see: https://towardsdatascience.com/how-to-create-a-cli-in-golang-with-cobra-d729641c7177

learn cobra + viper

example

# create a new app "example-001"
$ make cobra.app.create COBRA_APP=example-001

# add command "hello" to app "example-001"
$ make cobra.command.create COBRA_APP=example-001 COBRA_COMMAND="hello"