Skip to content

Harden gof init for paths, Postgres ports, and failed-run cleanup - #11

Open
iamtemi wants to merge 1 commit into
gofast-live:mainfrom
iamtemi:fix/gof-init-hardening
Open

Harden gof init for paths, Postgres ports, and failed-run cleanup#11
iamtemi wants to merge 1 commit into
gofast-live:mainfrom
iamtemi:fix/gof-init-hardening

Conversation

@iamtemi

@iamtemi iamtemi commented Jul 23, 2026

Copy link
Copy Markdown

Summary

  • Split init path vs project name so absolute paths don't become invalid Docker container names
  • Fail fast when the Postgres host port is in use, with --postgres-port to remap
  • Roll back the project directory (and compose resources) if init fails mid-run
  • Clean up download/unzip artifacts on failed template fetch

Test plan

  • gof init goapp in an empty dir succeeds
  • gof init codebase/goapp uses basename goapp for container names
  • With something on :5432, init fails and suggests --postgres-port
  • Forced mid-init failure leaves no leftover project folder

…eanup.

Support path-or-name destinations, --postgres-port with a clear retry hint, and roll back partial projects after download failures.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant