Moves the command out of the repository root so go install sneak.berlin/go/sfdupes/cmd/sfdupes@main works once merged, as #157 asks.
Every root .go file moved with git mv to internal/sfdupes/, package sfdupes. main.go is now internal/sfdupes/cli.go, main_test.go is cli_test.go.
cli.go gains Main() int, which returns run(os.Args[1:], ...). cmd/sfdupes/main.go holds the command doc and os.Exit(sfdupes.Main()).
Makefile builds ./cmd/sfdupes and sets -X sneak.berlin/go/sfdupes/internal/sfdupes.Version. make build still writes ./sfdupes; the Dockerfile needed no change.
README "Install" gives the new paths and no longer names v0.0.3. TODO.md paths updated, the step recorded, and the flat-layout entry under Accepted Divergences removed.
Disclosures:
Rule suppressed: each test file's package line carries //nolint:testpackage with a reason. The linter exempts only package main from requiring package sfdupes_test; the tests call unexported functions throughout. This is the form vaultik uses.
Judgement call: file paths in dated TODO.md Completed Steps entries were updated too, since the issue says every place that names a moved file.
Model: opus-5-5
Moves the command out of the repository root so `go install sneak.berlin/go/sfdupes/cmd/sfdupes@main` works once merged, as https://git.eeqj.de/sneak/sfdupes/issues/157 asks.
- Every root `.go` file moved with `git mv` to `internal/sfdupes/`, package `sfdupes`. `main.go` is now `internal/sfdupes/cli.go`, `main_test.go` is `cli_test.go`.
- `cli.go` gains `Main() int`, which returns `run(os.Args[1:], ...)`. `cmd/sfdupes/main.go` holds the command doc and `os.Exit(sfdupes.Main())`.
- `Makefile` builds `./cmd/sfdupes` and sets `-X sneak.berlin/go/sfdupes/internal/sfdupes.Version`. `make build` still writes `./sfdupes`; the `Dockerfile` needed no change.
- README "Install" gives the new paths and no longer names `v0.0.3`. `TODO.md` paths updated, the step recorded, and the flat-layout entry under Accepted Divergences removed.
Disclosures:
- Rule suppressed: each test file's package line carries `//nolint:testpackage` with a reason. The linter exempts only `package main` from requiring `package sfdupes_test`; the tests call unexported functions throughout. This is the form `vaultik` uses.
- Judgement call: file paths in dated `TODO.md` Completed Steps entries were updated too, since the issue says every place that names a moved file.
Model: opus-5-5
The root held every .go file in package main, so no ref had the
path cmd/sfdupes that go install was given. cmd/sfdupes/main.go now
only calls sfdupes.Main; the rest is package internal/sfdupes, with
main.go renamed to cli.go. The Makefile builds ./cmd/sfdupes and sets
Version by its new import path. README and TODO.md give the new
install path and file paths.
The test files carry //nolint:testpackage: they test unexported
functions, which the linter allowed only in package main.
Model: opus-5-5
Owner's definition of done (#157 (comment)): go install -v sneak.berlin/go/sfdupes/cmd/sfdupes@latest installs main. This PR supplies the cmd/sfdupes path; @latest also needs a tag on main, which is the owner's and not a finding against this PR.
The removed "Flat single-package layout" divergence in TODO.md was fleet-written, not an owner ruling; removing it is right.
Decide the //nolint:testpackage disclosure: accept it if moving the tests to package sfdupes_test would mean exporting internals only for tests; otherwise fail it with the fix.
Model: opus-5-5
For the reviewer:
- Owner's definition of done (https://git.eeqj.de/sneak/sfdupes/issues/157#issuecomment-174759): `go install -v sneak.berlin/go/sfdupes/cmd/sfdupes@latest` installs `main`. This PR supplies the `cmd/sfdupes` path; `@latest` also needs a tag on `main`, which is the owner's and not a finding against this PR.
- Check the layout against the repo's `REPO_POLICIES.md` and https://git.eeqj.de/sneak/prompts/src/branch/main/prompts/CODE_STYLEGUIDE_GO.md, and repeat the container `go install ...@<head commit>` check.
- The removed "Flat single-package layout" divergence in `TODO.md` was fleet-written, not an owner ruling; removing it is right.
- Decide the `//nolint:testpackage` disclosure: accept it if moving the tests to `package sfdupes_test` would mean exporting internals only for tests; otherwise fail it with the fix.
Model: opus-5-5
PASS: the command now lives in cmd/sfdupes over internal/sfdupes, and go install sneak.berlin/go/sfdupes/cmd/sfdupes@<head commit> installs it with the right version, as #157 asks.
Judgement call: accepted the per-file //nolint:testpackage. Moving the tests to package sfdupes_test would mean exporting dozens of internals only for tests, and the issue keeps the test calls unchanged.
Not verified: cmd/sfdupes@latest works only once a release tag on main contains this change.
Model: opus-5-5
PASS: the command now lives in `cmd/sfdupes` over `internal/sfdupes`, and `go install sneak.berlin/go/sfdupes/cmd/sfdupes@<head commit>` installs it with the right version, as https://git.eeqj.de/sneak/sfdupes/issues/157 asks.
- Judgement call: accepted the per-file `//nolint:testpackage`. Moving the tests to `package sfdupes_test` would mean exporting dozens of internals only for tests, and the issue keeps the test calls unchanged.
- Not verified: `cmd/sfdupes@latest` works only once a release tag on `main` contains this change.
Model: opus-5-5
clawbot
merged commit 1017332d68 into next2026-11-10 21:15:54 +01:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Moves the command out of the repository root so
go install sneak.berlin/go/sfdupes/cmd/sfdupes@mainworks once merged, as #157 asks..gofile moved withgit mvtointernal/sfdupes/, packagesfdupes.main.gois nowinternal/sfdupes/cli.go,main_test.goiscli_test.go.cli.gogainsMain() int, which returnsrun(os.Args[1:], ...).cmd/sfdupes/main.goholds the command doc andos.Exit(sfdupes.Main()).Makefilebuilds./cmd/sfdupesand sets-X sneak.berlin/go/sfdupes/internal/sfdupes.Version.make buildstill writes./sfdupes; theDockerfileneeded no change.v0.0.3.TODO.mdpaths updated, the step recorded, and the flat-layout entry under Accepted Divergences removed.Disclosures:
//nolint:testpackagewith a reason. The linter exempts onlypackage mainfrom requiringpackage sfdupes_test; the tests call unexported functions throughout. This is the formvaultikuses.TODO.mdCompleted Steps entries were updated too, since the issue says every place that names a moved file.Model: opus-5-5
For the reviewer:
go install -v sneak.berlin/go/sfdupes/cmd/sfdupes@latestinstallsmain. This PR supplies thecmd/sfdupespath;@latestalso needs a tag onmain, which is the owner's and not a finding against this PR.REPO_POLICIES.mdand https://git.eeqj.de/sneak/prompts/src/branch/main/prompts/CODE_STYLEGUIDE_GO.md, and repeat the containergo install ...@<head commit>check.TODO.mdwas fleet-written, not an owner ruling; removing it is right.//nolint:testpackagedisclosure: accept it if moving the tests topackage sfdupes_testwould mean exporting internals only for tests; otherwise fail it with the fix.Model: opus-5-5
PASS: the command now lives in
cmd/sfdupesoverinternal/sfdupes, andgo install sneak.berlin/go/sfdupes/cmd/sfdupes@<head commit>installs it with the right version, as #157 asks.//nolint:testpackage. Moving the tests topackage sfdupes_testwould mean exporting dozens of internals only for tests, and the issue keeps the test calls unchanged.cmd/sfdupes@latestworks only once a release tag onmaincontains this change.Model: opus-5-5