Files
Ydisks-Xianyu-Helper/go.mod
T
ChristandClaude Opus 4.8 0fa5d6617c refactor(db): 阶段A - driver 抽象 + SQLite 保持工作
- db.Open 改为接受 URL(sqlite:// mysql:// postgres://),返回 (db, dialect, err)
- 向后兼容:不含 scheme 的路径仍按 SQLite 文件处理
- migration 移到 migrations/sqlite/ 子目录,embed 包含三个方言目录
- Migrate 按方言选择子目录 + goose dialect
- Store 加 Dialect 字段,NewStore(db, dialect)
- cmd/server 加 -db-url 和 DATABASE_URL 环境变量(优先级:env > -db-url > -db)
- cmd/init-admin 同步支持 URL
- 新增依赖 pgx/v5、go-sql-driver/mysql
- mysql/postgres migration 目录暂为 SQLite 副本占位,阶段B/C 替换
- 所有测试调用方更新为新签名

验证:现有测试全过(SQLite 回归),SQLite 行为不变

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-06 12:35:01 +08:00

42 lines
1.5 KiB
AMPL

module xianyu-go
go 1.26.4
require (
github.com/coder/websocket v1.8.15
github.com/go-chi/chi/v5 v5.3.0
github.com/go-sql-driver/mysql v1.10.0
github.com/jackc/pgx/v5 v5.10.0
github.com/playwright-community/playwright-go v0.5700.1
github.com/pressly/goose/v3 v3.27.1
github.com/sashabaranov/go-openai v1.41.2
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e
golang.org/x/crypto v0.50.0
golang.org/x/term v0.44.0
modernc.org/sqlite v1.53.0
)
require (
filippo.io/edwards25519 v1.2.0 // indirect
github.com/deckarep/golang-set/v2 v2.8.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/go-jose/go-jose/v3 v3.0.4 // indirect
github.com/go-stack/stack v1.8.1 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
github.com/jackc/puddle/v2 v2.2.2 // indirect
github.com/mattn/go-isatty v0.0.21 // indirect
github.com/mfridman/interpolate v0.0.2 // indirect
github.com/ncruces/go-strftime v1.0.0 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/sethvargo/go-retry v0.3.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/sync v0.20.0 // indirect
golang.org/x/sys v0.46.0 // indirect
golang.org/x/text v0.36.0 // indirect
modernc.org/libc v1.73.4 // indirect
modernc.org/mathutil v1.7.1 // indirect
modernc.org/memory v1.11.0 // indirect
)