Skip to content

Contributing

We welcome contributions! Here's how to get started.

Development Setup

bash
git clone https://github.com/gocronx/gocronx-scaffold.git
cd gocronx-scaffold
go mod tidy
go build ./cmd/gocronx/

Running Tests

bash
go test ./...

Project Structure

  • cmd/gocronx/ — CLI tool entry point
  • internal/cli/ — CLI commands (init, update, uninstall)
  • internal/generator/ — Template engine and embedded templates
  • internal/generator/templates/ — All project template files

Adding a New Template File

  1. Add the file under internal/generator/templates/
  2. If it needs variable substitution, use [[ .Variable ]] syntax and name it with .tmpl extension
  3. Static files (no substitution needed) use their normal extension
  4. Run tests: go test ./internal/generator/

Commit Messages

Use conventional commits:

feat: add Redis cluster support
fix: resolve template path issue on Windows
docs: update CLI reference