Skip to content

bmshema/go_projectHelpers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Go Project Helpers

This is a respository of helper scripts to initialize Go projects in various common project layouts.

Setup:

  1. Clone this repository.
git clone https://github.com/bmshema/go_projectHelpers.git
  1. Run setup_config.sh. This will establish environment variables for your WORKDIR (your workspace for go projects) and DOMAIN (your domain) to be used by the helper scripts.
  2. Run the appropriate helper script for your project.
    • Each helper script requires a project name arguement.
Usage: ./go_cobra.sh -n NAME [-d DOMAIN]

Options:
-d DOMAIN    The project repo domain. (If different than what was set globally)
-n NAME      The project name. This option is required.

Examples:
./go_cobra.sh -n mycliapp
./go_cobra.sh -n mycliapp -d mydomain.com

Helpers:

go_cobra:

Initalizes a Go project with Cobra CLI dependency in the following layout...

.
├── main.go
├── go.mod
├── go.sum
├── cmd
│  └── projectname
│    └── root.go
└── pkg
  └── projectname
    └── projectname.go

About

Helper scripts to setup various Go project layouts

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages