From 7572425590136060e96603f241a1d19b2d774d59 Mon Sep 17 00:00:00 2001 From: IvisTang Date: Wed, 7 Jan 2026 20:40:00 +0800 Subject: [PATCH] 2 --- README.md | 40 ++++++++++------------------------------ README_CN.md | 39 ++++++++++----------------------------- 2 files changed, 20 insertions(+), 59 deletions(-) diff --git a/README.md b/README.md index e4e1ec7..dc63c14 100644 --- a/README.md +++ b/README.md @@ -147,70 +147,50 @@ design-patterns/ ### Go Implementation 1. Navigate to the Go directory: + ```bash cd go ``` -2. Each pattern directory contains: - - Implementation files - - Example usage - - Tests (if applicable) - -3. Run examples using: +2. Run examples using: ```bash - go run /main.go + make ``` ### Python Implementation 1. Navigate to the Python directory: + ```bash cd python ``` -2. Each pattern directory contains: - - Implementation modules - - Example usage - - Tests (if applicable) +2. Run examples using: -3. Run examples using: ```bash - python -m .main + make ``` ### TypeScript Implementation 1. Navigate to the TypeScript directory: + ```bash cd ts ``` 2. Install dependencies: + ```bash pnpm install ``` -3. Each pattern directory contains: - - Implementation files - - Example usage - - Tests (if applicable) +3. Run examples using: -4. Run examples using: ```bash - pnpm run + make ``` -## Pattern Categories - -### Creational Patterns -Creational patterns abstract the instantiation process. They help make a system independent of how its objects are created, composed, and represented. - -### Structural Patterns -Structural patterns deal with the composition of classes or objects. They help ensure that when one part of a system changes, the entire system doesn't need to change. - -### Behavioral Patterns -Behavioral patterns characterize the ways in which classes or objects interact and distribute responsibility. They focus on communication between objects. - ## Contributing Contributions are welcome! Here are some ways you can contribute: diff --git a/README_CN.md b/README_CN.md index 820f29e..0e7c310 100644 --- a/README_CN.md +++ b/README_CN.md @@ -147,70 +147,51 @@ design-patterns/ ### Go 实现 1. 进入 Go 目录: + ```bash cd go ``` -2. 每个模式目录包含: - - 实现文件 - - 示例用法 - - 测试(如适用) +2. 运行示例: -3. 运行示例: ```bash - go run /main.go + make ``` ### Python 实现 1. 进入 Python 目录: + ```bash cd python ``` -2. 每个模式目录包含: - - 实现模块 - - 示例用法 - - 测试(如适用) +2. 运行示例: -3. 运行示例: ```bash - python -m .main + make ``` ### TypeScript 实现 1. 进入 TypeScript 目录: + ```bash cd ts ``` 2. 安装依赖: + ```bash pnpm install ``` -3. 每个模式目录包含: - - 实现文件 - - 示例用法 - - 测试(如适用) +3. 运行示例: -4. 运行示例: ```bash - pnpm run + make ``` -## 模式分类 - -### 创建型模式 -创建型模式抽象了实例化过程。它们帮助系统独立于如何创建、组合和表示其对象。 - -### 结构型模式 -结构型模式处理类或对象的组合。它们确保当系统的一部分发生变化时,整个系统不需要改变。 - -### 行为型模式 -行为型模式描述类或对象如何交互和分配职责。它们专注于对象之间的通信。 - ## 贡献 欢迎贡献!您可以通过以下方式参与: