golang-dev

star 0

When you are developing Go code in an environment where the final deployment runs in Docker, but Go is installed locally on Ubuntu for rapid development iteration.

mporenta By mporenta schedule Updated 1/9/2026

name: golang-dev description: When you are developing Go code in an environment where the final deployment runs in Docker, but Go is installed locally on Ubuntu for rapid development iteration.

Go Development Workflow

Critical Development Process

Always compile and test Go code locally BEFORE rebuilding any Docker image or container.

Why Local-First Development

  1. Speed: Local go build and go test complete in seconds. Docker image rebuilds take significantly longer due to layer caching, dependency resolution, and container startup overhead.

  2. Faster Feedback Loop: Catching syntax errors, type mismatches, and failing tests locally saves minutes per iteration compared to discovering them after a Docker build.

  3. Resource Efficiency: Avoid creating unnecessary intermediate Docker images and consuming disk space for builds that will fail.

  4. Debugging: Local tooling (go vet, staticcheck, dlv debugger) provides richer diagnostics than container logs.

Required Local Steps Before Docker

  1. Format the code:

    go fmt ./...
    
  2. Vet for common issues:

    go vet ./...
    
  3. Compile successfully:

    go build ./...
    
  4. Run tests:

    go test ./...
    
  5. Only after all pass: Proceed with docker build or docker compose up --build

Exception Cases

Only skip local testing if:

  • The change is Docker-specific (Dockerfile, entrypoint scripts, environment variables)
  • You're debugging container networking or volume mounting issues
  • The test requires services only available in the Docker Compose stack (and mocking isn't feasible)

Even in these cases, still run go build locally to catch compilation errors.

Install via CLI
npx skills add https://github.com/mporenta/airflow --skill golang-dev
Repository Details
star Stars 0
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator