Skip to content

epicseven-cup/go-cli-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

go-cli-template

template for go cli setup for github

Go Cli install path

The path of go install <github path> should be the url endpoints of the github project,

go install github.com/<username>/<project>

Please use the readme example below as an example

Go mod init

Important note is that when you run go mod init, you will need to use lthe github url endpoint for the project as pointed out in the selection above.

For example, for this project the github url endpoint will be github.com/epicseven-cup/go-cli-template

So when you will need to run go mod init github.com/epicseven-cup/go-cli-template

Binary download

When you run go install github.com/epicseven-cup/go-cli-template@latest, but default it will go by the main.go file that is located in the root of the repository.

You can also point the location to another main.go file by changing the file path examples if you have cmd/go-cli-template/main.go you can use:

go install github.com/epicseven-cup/go-cli-template/cmd/go-cli-template@latest

Install

  1. You will need to install go on your machine: https://go.dev/doc/install
  2. Setup GOPATH

Add the following to your shell config

export PATH=${PATH}:$HOME/go/bin

More information: https://go.dev/wiki/GOPATH#gopath-variable

  1. Install the binary
go install github.com/epicseven-cup/go-cli-template@latest 

There could be delays between the Goproxy and GitHub binarys, you can use the direct setup

GOPROXY=direct go install github.com/epicseven-cup/go-cli-template@latest

About

template for go cli setup for github

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages