cmd/gopssh/main.goprovides the CLI entrypoint, with supporting helpers undercmd/gopssh/gopssh/.- Core parallel SSH logic, worker pools, and agent wrappers live in
pkg/pssh/, which also houses unit tests and fixtures inpkg/pssh/test/. - RPM and DEB packaging utilities are grouped under
pack/; the curl-based installer and uninstaller areinstall.shanduninstall.sh, and release metadata lives inreleasenote.template.md. - The top-level
Makefileorchestrates builds, tests, linting, and coverage aggregation; keep changes aligned with its targets.
make buildcompilescmd/gopsshinto a localgopsshbinary; it is the default target and cleans stale artifacts.make testruns race-enabled tests for all packages and writes coverage tocoverage.txt.make lintinvokes the pinnedgolangci-lintbinary from./bin; runmake setuponce to install it (requires network access).- For release builds, mirror the README example:
go build -ldflags "-X main.version=$(TAG) ..."so version metadata stays accurate.
- Follow Go defaults: tabs for indentation,
gofmt+goimportsformatting, exported symbols in PascalCase, internals in camelCase. - Keep files self-contained and small; place shared concurrency helpers in
pkg/psshrather than duplicating logic incmd/. - Run
make fmt(or its underlyinggofmt/goimportsloop) before committing to avoid lint noise.
- Name tests
*_test.gowith functionsTestXxx; table-driven cases fit well for SSH session permutations. - Use
go test ./cmd/gopssh ./pkg/pssh -racefor quick local runs; rely onmake testwhen you need coverage artifacts. - Place reusable fixtures under
pkg/pssh/testand keep them deterministic to prevent race test flakiness.
- Recent history mixes concise imperative commits (
fix worker hang) with Conventional Commits (fix: update dependency); prefer the latter style for clarity. - Ensure commits stay focused and include context for packaging or release changes (e.g., note RPM spec updates).
- Before opening a PR, run
make build test lint, attach the resulting summary, link related issues, and describe any manual SSH verification performed.
- Build artifacts land in
.bin/; confirm the binary version with./gopssh -versionbefore runningpack/debpackorpack/rpmpack. - Keep
install.shaligned with release archive names and the generatedchecksums.txtfile, and keepuninstall.shaligned with its installation directory behavior. - Update
releasenote.template.mdalongside packaging changes so CI-driven releases stay coherent.