refactor: standardize market file naming by data dimension #27
Reference in New Issue
Block a user
Delete Branch "worktree-issue-26-go-filename-consistency"
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?
Summary
Refactor
internal/data/marketfilenames to consistent data-dimension naming and align pair responsibilities by file.Changes
spot_price.go->spot_prices.gofuture_price.go->futures_prices.gotrading_pairs.go->spot_pairs.gofutures_pairs.goand move futures-pair specific logic theremain.gofor orchestration/cache refresh flowScope
Test Plan
go test ./internal/data/market -vgo test ./...Related
FAIL
[Medium]
internal/data/market/trading_pairs_test.gostill keeps the oldtrading_pairsfilename even thoughtrading_pairs.gowas removed. The tests now cover shared canonical symbol helpers andfutureCacheTokenKey, so please rename/split it to match the new file boundaries, for examplespot_pairs_test.goorpair_symbols_test.go+futures_pairs_test.go.[Low]
internal/data/market/main.gostill contains dead code:alphaCacheRefreshLoopis no longer called afterNewMarketDataswitched tocacheRefreshLoop, andrefreshAllCachesalready refreshes Alpha tokens. Since this PR is cleaning market file structure, please remove that stale helper too.Validation:
go test ./internal/data/market -vgo test ./...Đã xử lý cả 2 ý review trên branch PR.
Updates applied
internal/data/market/trading_pairs_test.go->internal/data/market/pairs_test.gointernal/data/market/main.go:alphaCacheRefreshLoop(không còn được gọi)Validation
go test ./internal/data/market -v✅go test ./...✅Nếu bạn muốn mình tách test theo 2 file riêng (
spot_pairs_test.go+futures_pairs_test.go) thay vìpairs_test.go, mình có thể tách tiếp ở PR này.PASS
No blocking issues found in the latest update. The previous review feedback has been addressed:
trading_pairs_test.gowas renamed topairs_test.go.alphaCacheRefreshLoopwas removed frommain.go.Validation:
go test ./internal/data/market -vgo test ./...