Skip to content
/ go-template-cli Public template

A template repository for Golang CLI projects using Cobra for argument handling.

License

Notifications You must be signed in to change notification settings

Drakmyth/go-template-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-template-cli

This is a quick and simple example of a Go CLI application. The Cobra library is used to handle argument and flag parsing.

Built With

  • Golang

Usage

Execute go-template-cli help for more detailed information.

Command Arguments Description
subcommand [flags] <input-text> Example argument handling

Development

Build

> go build

Debugging

Using the Delve debugger with CLI applications is a little tricky. See the Delve documentation for recommended procedures on how to do this.

Release

While the produced binary is a CLI application and is intended to be executed by directly, a containerized installation is also provided. This container utilizes a dedicated build stage along with the scratch Docker image to ensure the final image contains only the necessary resources and nothing else.

Build

> docker build . -t go-template-cli
> docker run go-template-cli subcommand "Hello, World!"

License

This example code is provided to the public domain via the CC0 1.0 Universal License. See LICENSE.md for more information.

About

A template repository for Golang CLI projects using Cobra for argument handling.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published