You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dedup AFP file/dir bitmap constants onto core/protocol/afp (P2, part 1)
core/service/afp/parms.go redefined its own fdBitmap*/fileBitmap*/
dirBitmap* constants -- an exact byte-for-byte duplicate (same names
minus casing, same bit values) of core/protocol/afp's already-exported
FDBitmap*/FileBitmap*/DirBitmap* constants in afp.go. Per the plan's
staged approach (constants first as the near-zero-risk half of the
AFP DTO-duplication cleanup, struct unification separately since
that's the higher-blast-radius half): deleted the private const block
and repointed every one of its 18 usages, across 11 files, at the
protocol package (aliased `protocol`, matching the
core/service/smb -> core/protocol/smb convention already used
elsewhere in this codebase, since core/protocol/afp and
core/service/afp share the plain package name "afp").
Careful about the false-positive collision here: catsearch.go/
handlers.go/dispatch_test.go also have LOCAL VARIABLES literally
named `fileBitmap`/`dirBitmap` (the request-parsed runtime values,
completely unrelated to the exported constants of almost the same
name) -- confirmed the replacement only touched the 18 specific full
constant identifiers (fdBitmapAttributes, fileBitmapFileNum, etc.),
never the bare local-variable names, before running it.
No new tests added for this pass: the existing service/afp test suite
(parms_test.go, catsearch_test.go, dispatch_test.go, golden_test.go,
forkio_test.go, and the rest -- 109 passing subtests) already
exercises every bitmap path this touches and is the safety net a pure
constant-value rename needs; nothing here changes behavior. Full
build/vet/test/archtest swept clean after.
0 commit comments