feat(go/M2.6): port domain/synch.GenerateSyncID #8
Reference in New Issue
Block a user
Delete Branch "feat/m2-6-synch-generate-sync-id"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Port
generate_sync_idfromscripts/sync_fio_to_sheets.pytogo/internal/domain/synch.GenerateSyncID.Key detail: float string format
amountin Fio transactions is always a Pythonfloat. Python'sstr(500.0)→"500.0", but Go'sstrconv.FormatFloat(500.0, 'g', -1, 64)→"500". The hash would silently differ. Fixed viaformatAmountwhich uses'f'notation in[1e-4, 1e16)and'e'outside — matching CPython'sstr(float)crossover thresholds.Changes
go/internal/domain/synch/synch.go—Transactionstruct,GenerateSyncID, internalformatAmountgo/internal/domain/synch/synch_test.go— 6 hash tests + 9 float-format tests, all expected values verified against live Pythondocs/plans/2026-05-06-1236-go-m2-6-synch-generate-sync-id.mdTest