ska
Table of Contents
Features
Project Layout
- assets/ => docs, images, etc
- cmd/ => commandline configurartions (flags, subcommands)
- pkg/ => packages that are okay to import for other projects
- internal/ => packages that are only for project internal purposes
How to use this template
bash <(curl -s https://raw.githubusercontent.com/gchiesa/ska/master/install.sh)
In order to make the CI work you will need to have the following Secrets in your repository defined:
Repository -> Settings -> Secrets & variables -> CODECOV_TOKEN
, DOCKERHUB_TOKEN
& DOCKERHUB_USERNAME
Demo Application
$> golang-cli-processor -h
golang-cli project processor demo application
Usage:
golang-cli-processor [flags]
golang-cli-processor [command]
Available Commands:
completion Generate the autocompletion script for the specified shell
example example subcommand which adds or multiplies two given integers
help Help about any command
version golang-cli-processor version
Flags:
-h, --help help for golang-cli-processor
Use "ska [command] --help" for more information about a command.
$> golang-cli-processor example 2 5 --add
7
$> golang-cli-processor example 2 5 --multiply
10
Makefile Targets
$> make
bootstrap install build deps
build build golang binary
clean clean up environment
cover display test coverage
docker-build dockerize golang application
fmt format go files
help list makefile targets
install install golang binary
lint lint go files
pre-commit run pre-commit hooks
run run the app
test display test coverage
Contribute
If you find issues in that setup or have some nice features / improvements, I would welcome an issue or a PR :)