Skip to content
nghiack7Public

About

Scaffold production-ready Go services in seconds

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

GoForge

Scaffold production-ready Go services in seconds.

Install

go install github.com/nghiack7/goforge@latest

Usage

Create a new project

# REST API (default)
goforge new myapi

# gRPC service
goforge new myservice --template grpc

# Background worker
goforge new myworker --template worker

List available templates

goforge list

Templates

Template Description
rest-api REST API with health check, graceful shutdown, structured logging, Dockerfile, Makefile
grpc gRPC service with health check, proto scaffold, graceful shutdown, Dockerfile
worker Background worker with ticker loop, health endpoint, graceful shutdown, Dockerfile

What's included in every template

  • Structured logging (log/slog with JSON output)
  • Graceful shutdown (SIGINT/SIGTERM handling)
  • Health check endpoint
  • Dockerfile (multi-stage build)
  • Makefile (build, run, test, lint, docker)
  • .gitignore

Generated project structure (REST API)

myapi/
├── main.go                    # Entry point with graceful shutdown
├── go.mod
├── Dockerfile
├── Makefile
├── .gitignore
└── internal/
    ├── config/
    │   └── config.go          # Environment-based configuration
    └── handler/
        └── handler.go         # HTTP handlers with health check

Development

git clone https://github.com/nghiack7/goforge.git
cd goforge
go build ./...
go test ./... -v -race

License

MIT

About

Scaffold production-ready Go services in seconds

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages