From 6e48706b73601c704c1d7e775180e0e30fa3a56f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A7=E5=8F=AF?= Date: Thu, 15 Feb 2024 12:11:15 +0800 Subject: [PATCH] docs: add feature doc --- README.md | 13 ++++++++++++- README_CN.md | 12 ++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 25c4ea5..cecfcc9 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,20 @@ # Kod - Kod stands for **Killer Of Dependency**, a generics based dependency injection toolkit for Go. +## Feature + +- **Component Based**: Kod is a component-based framework. Components are the building blocks of a Kod application. +- **Configurable**: Kod can use TOML/YAML/JSON files to configure how applications are run. +- **Testing**: Kod includes a Test function that you can use to test your Kod applications. +- **Logging**: Kod provides a logging API, kod.L. Kod also integrates the logs into the environment where your application is deployed. +- **OpenTelemetry**: Kod relies on OpenTelemetry to collect trace and metrics from your application. +- **Hooks**: Kod provides a way to run code when a component start or stop. +- **Interceptors**: Kod has built-in common interceptors, and components can implement the following methods to inject these interceptors into component methods. +- **Interface Generation**: Kod provides a way to generate interface from structure. +- **Code Generation**: Kod provides a way to generate kod related codes for your kod application. + ## Installation ```bash diff --git a/README_CN.md b/README_CN.md index dc346cc..d80200a 100644 --- a/README_CN.md +++ b/README_CN.md @@ -12,6 +12,18 @@ Kod代表“依赖杀手”,是基于泛型的Go语言依赖注入工具。 +## 功能 + +- **基于组件**: Kod 是一个基于组件的框架。组件是 Kod 应用程序的构建模块。 +- **可配置的**: Kod 可以使用 TOML/YAML/JSON 文件来配置应用程序的运行方式。 +- **测试**: Kod 包含一个 Test 函数,您可以使用它来测试您的 Kod 应用程序。 +- **日志记录**: Kod 提供了一个日志记录 API,kod.L。Kod 还将日志集成到部署您的应用程序的环境- 中。 +- **OpenTelemetry**: Kod 依赖于 OpenTelemetry 来收集应用程序的跟踪和指标。 +- **钩子**: Kod 提供了一种在组件启动或停止时运行代码的方式。 +- **拦截器**: Kod 内置了常见的拦截器,组件可以实现以下方法来将这些拦截器注入到组件方法中。 +- **接口生成**: Kod 提供了一种从结构体生成接口的方法。 +- **代码生成**: Kod 提供了一种为您的 Kod 应用程序生成与 kod 相关代码的方法。 + ## 安装 ```bash go install github.com/go-kod/kod/cmd/kod@latest