Skip to content

Repository files navigation

GHOST

GitHub licenseGitHub releaseGithub main statusConventional Commits

Go High-level Open Service Templater

GHOST creates in working dir fully functional microservice with basic functionality:

  • Ready to use Makefile with help target
  • Ready to use docker-compose with override template
  • Ready to use security checks by trivy, semgrep and govulncheck
  • Kubernetes lifecycle compatible health checks
  • Log level changing by HTTP-request
  • Easy configurable logs (plain text|JSON)
  • Mask sensitive config data in logs
  • Graceful shutdown

Usage

Example
$ ghost -h
Usage: ghost [options...]
OPTIONS
-d, --description <string> (default: Go microservice) Project short description
-g, --go-image <string> (default: nafigat0r/go:1.24.4) Go docker image
-c, --govulncheck-image <string> (default: nafigat0r/govulncheck:1.1.4) Govulncheck docker image
-h, --help display this help message
-l, --linter-image <string> (default: nafigat0r/golangci-lint:2.1.6) Linter docker image
-m, --module-name <string> (default: github.com/test/test) Go module name
-n, --name <string> (default: test) Project short name
-t, --shutdown-timeout <duration> (default: 10s) Timeout for graceful shutdown
-v, --version display version
-r, --with-rest <bool> (default: false) Add HTTP server with REST API functionality
ENVIRONMENT
GHOST_DESCRIPTION <string> (default: Go microservice) Project short description
GHOST_GO_IMAGE <string> (default: nafigat0r/go:1.24.4) Go docker image
GHOST_GOVULNCHECK_IMAGE <string> (default: nafigat0r/govulncheck:1.1.4) Govulncheck docker image
GHOST_LINTER_IMAGE <string> (default: nafigat0r/golangci-lint:2.1.6) Linter docker image
GHOST_MODULE_NAME <string> (default: github.com/test/test) Go module name
GHOST_NAME <string> (default: test) Project short name
GHOST_SHUTDOWN_TIMEOUT <duration> (default: 10s) Timeout for graceful shutdown
GHOST_WITH_REST <bool> (default: false) Add HTTP server with REST API functionality

Docker

Run via docker
docker run \
-u $(id -u):$(id -g) --rm -ti \
-v "$(pwd):/var/ghost" \
nafigat0r/ghost --help

Versioning

This software follows "Semantic Versioning" specifications. The signature of exported package functions is used as a public API. Read more on SemVer.org.

About

Go Hi-level Open Service Templater

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages