cauldron

command module
v1.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2021 License: MIT Imports: 3 Imported by: 0

README

Cauldron

Actions Status Coverage Status Open Issues GitHub release (latest by date) Go Report Card

Project generator using Catalyst as a template.

Cauldron will generate a fully configured project along with a sample set so you can check whether everything is working fine.

The sample set covers request response lifecycle handling of basic CRUD operations. So you can use them as an example to create your REST API.

The project that will be created uses go.mod for dependency management. This will enable you to create and run projects outside of the GOPATH.

Visit the Catalyst base project for more information.

Installation

go get github.com/kosatnkn/cauldron

Usage

Command

cauldron -n Sample -s github.com/username [-t v1.0.0]
cauldron --name Sample --namespace github.com/username [--tag v1.0.0]

Input Parameters

  • -n --name Project name (ex: ProjectOne). The name will be converted to lowercase to be used in module path.
  • -s --namespace Namespace for the project (ex: github.com/example)
  • -t --tag Release version of Catalyst to be used. The latest version will be used if -t is not provided
  • -h --help Show help message

This will create a new project with go.mod module path of github.com/username/sample

Cauldron will do a git init on the newly created project but you will have to stage all the files in the project and do the first commit yourself.

git add .

git commit -m "first commit"

Using Go mod

Go mod is used as the dependency management mechanism. Visit here for more details.

Use go mod in projects that are within the GOPATH

export GO111MODULE=on

Initialize go mod

go mod init github.com/my/repo

View final versions that will be used in a build for all direct and indirect dependencies

go list -m all

View available minor and patch upgrades for all direct and indirect dependencies

go list -u -m all

Update all direct and indirect dependencies to latest minor or patch upgrades (pre-releases are ignored)

go get -u or go get -u=patch

Build or test all packages in the module when run from the module root directory

go build ./... or go test ./...

Prune any no-longer-needed dependencies from go.mod and add any dependencies needed for other combinations of OS, architecture, and build tags

go mod tidy

Optional step to create a vendor directory

go mod vendor

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL