Skip to content

docs: rewrite README with complete Quick Start guide#26

Open
AWaterColorPen wants to merge 1 commit intomainfrom
feature/phase1-readme-quickstart
Open

docs: rewrite README with complete Quick Start guide#26
AWaterColorPen wants to merge 1 commit intomainfrom
feature/phase1-readme-quickstart

Conversation

@AWaterColorPen
Copy link
Copy Markdown
Owner

变更说明

这是 caskin 现代化迭代 Phase 1 的 README Quick Start 任务。

改动内容

全面重写 README,补充真实可运行的 Quick Start 示例:

  • 添加 CI 和 pkg.go.dev 徽章
  • Step-by-step Quick Start(共 6 步):
    1. go get 安装
    2. TOML dictionary 配置示例(article feature)
    3. caskin.Register[T] 泛型类型注册
    4. 创建 Service 实例(带 SQLite 示例)
    5. 初始化 Domain + Superadmin
    6. 角色分配和权限检查、CurrentService 用法
  • 补充 playground 包的测试用法说明
  • 新增存储后端对照表(sqlite/mysql/postgres)
  • 补充 Redis watcher 配置示例
  • 修复 WatcherOption 字段(Type + Address)与实际结构体一致
  • 移除不准确的 SQL Server 说明(metadata_database.go 中未实现)

Phase 1 进度

  • 升级 Go 到 1.24
  • 依赖升级(无破坏性变更)
  • 使用 stdlib slices/cmp 替换 golang.org/x/exp
  • 使用原生 for range 替换 go-linq
  • 完善 README Quick Start
  • 补充 godoc 注释

- Add badges (Go CI, pkg.go.dev)
- Replace sparse Getting Started with step-by-step Quick Start:
  - go get install instruction
  - TOML dictionary config example (article feature)
  - Register[T] generic type setup
  - Service creation with SQLite
  - Domain + superadmin bootstrap
  - Role assignment and permission check
  - CurrentService scoped usage
  - playground package for testing
- Add storage backends table (sqlite/mysql/postgres)
- Add Redis watcher configuration example
- Fix WatcherOption fields (Type + Address) to match actual struct
- Remove inaccurate SQL Server reference (not in metadata_database.go)

Phase 1 task: 完善 README Quick Start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant