docs: fix Run-your-project command to match the shipped scaffold#95
Merged
Conversation
The README's 'Run your project' step documented `go run ./<project>`, which fails for anyone following the as-shipped scaffold — there is no `<project>` directory (`cmd/`, `internal/`, `pkg/` ship as empty `.gitkeep` placeholders), so `go run ./<project>` (and any placeholder substitution) errors with `directory not found`. The template's runnable entry point is the root `main.go` (package main), which runs out of the box with `go run .` (exit 0), consistent with the whole-module `go build ./...` / `go test ./...` commands already documented in the same section. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
✅MegaLinter analysis: Success
Notices📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining See detailed reports in MegaLinter artifacts
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Problem
The README Usage → Run your project step documents a command that fails on the as-shipped template:
There is no
<project>directory in the scaffold —cmd/,internal/, andpkg/ship as empty.gitkeepplaceholders, and the runnable entry point is the rootmain.go(package main). So the documented command errors for any user, with or without substituting a name:Fix
Document the command that actually runs the shipped scaffold out of the box:
This is consistent with the whole-module forms already documented in the same Usage section (
go build ./...,go test ./...) and with the "works from a clean baseline" spirit of the template. A user who later moves their entry point undercmd/<name>/will naturally adjust togo run ./cmd/<name>.Validation
Verified against a fresh clone on
go1.26.4:go run .go run ./<project>(as written)directory not foundgo run ./project(placeholder substituted)directory not foundDocs-only, single-line change;
AGENTS.mdand the rest of the README were reviewed and are accurate (no further drift).