Created
November 13, 2021 17:25
-
-
Save ltpitt/c9724b41fe48ebf1716650d8501b3056 to your computer and use it in GitHub Desktop.
How to create a cli tool in go using cobra
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
go get -v github.com/spf13/cobra/cobra | |
cobra init --pkg-name github.com/ltpitt/tri -a ltpitt | |
go mod init github.com/ltpitt/tri | |
go get github.com/spf13/cobra | |
go get github.com/spf13/viper | |
go build | |
tri.exe |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment