Move main.go to cmd/keyfunc #20

Closed
opened 2026-09-21 09:18:05 +02:00 by clawbot · 1 comment
Collaborator

REPO_POLICIES.md keeps the repository root for project-level files and puts Go entrypoints under cmd/, "one main.go per binary whose body is a single call into internal/". main.go is in the root.

Implementation

  • Move main.go to cmd/keyfunc/main.go, unchanged apart from what the move needs (use git mv).
  • Makefile build target builds ./cmd/keyfunc and still writes ./keyfunc; .gitignore, Dockerfile and .dockerignore checked for anything that named the old place.
  • README "Building and running" stays true; if it gains or has a go install line, the path is .../keyfunc/cmd/keyfunc.

Definition of done

  • No .go file in the repository root; make build produces ./keyfunc and ./keyfunc --version prints the stamped version.
  • make check and make docker green. Branch cut from next, PR base next.

Model: fable-5-1

`REPO_POLICIES.md` keeps the repository root for project-level files and puts Go entrypoints under `cmd/`, "one `main.go` per binary whose body is a single call into `internal/`". `main.go` is in the root. ## Implementation - Move `main.go` to `cmd/keyfunc/main.go`, unchanged apart from what the move needs (use `git mv`). - `Makefile` `build` target builds `./cmd/keyfunc` and still writes `./keyfunc`; `.gitignore`, `Dockerfile` and `.dockerignore` checked for anything that named the old place. - README "Building and running" stays true; if it gains or has a `go install` line, the path is `.../keyfunc/cmd/keyfunc`. ## Definition of done - No `.go` file in the repository root; `make build` produces `./keyfunc` and `./keyfunc --version` prints the stamped version. - `make check` and `make docker` green. Branch cut from `next`, PR base `next`. Model: fable-5-1
clawbot self-assigned this 2026-09-21 09:18:05 +02:00
Author
Collaborator

Done in #23 (base next).

Moved main.go to cmd/keyfunc/main.go with git mv, unchanged apart
from the move, and pointed the Makefile build target at ./cmd/keyfunc;
the binary is still written to ./keyfunc. No other file named the old
location: the Dockerfile and script/ go through make build, and
.gitignore/.dockerignore reference the built binary, not the source.
The README build section stays accurate. No .go file remains in the
root; make check and make docker are green and ./keyfunc --version
prints the stamped version.

Model: opus-4-8

Done in https://git.eeqj.de/sneak/keyfunc/pulls/23 (base `next`). Moved `main.go` to `cmd/keyfunc/main.go` with `git mv`, unchanged apart from the move, and pointed the Makefile `build` target at `./cmd/keyfunc`; the binary is still written to `./keyfunc`. No other file named the old location: the Dockerfile and `script/` go through `make build`, and `.gitignore`/`.dockerignore` reference the built binary, not the source. The README build section stays accurate. No `.go` file remains in the root; `make check` and `make docker` are green and `./keyfunc --version` prints the stamped version. Model: opus-4-8
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/keyfunc#20