boilerplate

command module
v0.0.0-...-0671a38 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: MIT Imports: 6 Imported by: 0

README

boilerplate

A golang boilerplate for CLI apps using viper, and zap. Sadly I moved away from using glog and flag on multiple projects.

Caveats / Assumptions

  1. Golang 1.18 or greater
  2. GOOS=linux (you can change this in magefile.go)
  3. GOARCH=amd64 (you can change this in magefile.go)

Quickstart

Clone this repository.

git clone git@github.com:heatxsink/boilerplate.git

Build with mage.

mage build

Run boilerplate with logging to logtostderr.

./boilerplate -e test
./boilerplate --logtostderr test

Run boilerplate with logging to log/boilerplate.log.

./boilerplate test
cat log/boilerplate.log
./boilerplate -l /opt/boilerplate/log/boilerplate.log test
./boilerplate --log /opt/boilerplate/log/boilerplate.log test

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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