chris 2 éve
szülő
commit
f62a1940a4
2 módosított fájl, 66 hozzáadás és 29 törlés
  1. 29 9
      README.md
  2. 37 20
      README_zh.md

+ 29 - 9
README.md

@@ -1,12 +1,18 @@
-# Nunu
-[中文介绍](https://github.com/go-nunu/nunu-layout-advanced/blob/main/README_zh.md)
+# Nunu — A CLI tool for building go aplication.
 
+Nunu is an application scaffold based on Golang, named after a game character in League of Legends, a little boy riding on the shoulder of a snow monster. Like Nunu, this project also stands on the shoulders of giants, integrating various popular libraries in the Golang ecosystem. Their combination can help you quickly build an efficient and reliable application.
+
+[中文介绍](https://github.com/go-nunu/nunu/blob/main/README_zh.md)
 
-Nunu is an application scaffold based on Golang. Its name comes from the character Nunu in League of Legends, who is a little boy riding on the shoulder of a snowman. Like Nunu, This Project also stands on the shoulders of giants, and it is composed of various third-party libraries, including gin, gorm, wire, viper, zap, golang-jwt, go-redis, testify, sonyflake, go-survey, cobra, etc. These libraries are very popular in the Golang ecosystem, and their combination can help you quickly build an efficient and reliable application.
 
 ![Nunu](https://github.com/go-nunu/nunu/blob/main/.github/assets/banner.png)
 
 
+
+
+
+
+
 ## Features
 
 - **Gin**: https://github.com/gin-gonic/gin
@@ -20,6 +26,7 @@ Nunu is an application scaffold based on Golang. Its name comes from the charact
 - **Sonyflake**: https://github.com/sony/sonyflake
 - **robfig-cron**: https://github.com/robfig/cron
 - More...
+
 ## Features
 * **Low learning cost and customization**: Nunu encapsulates some popular libraries that Gopher is most familiar with. You can easily customize your application to meet specific needs.
 * **High performance and scalability**: Nunu aims to have high performance and scalability. It uses the latest technology and best practices to ensure that your application can handle high traffic and large amounts of data.
@@ -27,8 +34,16 @@ Nunu is an application scaffold based on Golang. Its name comes from the charact
 * **Modular and extensible**: Nunu is designed to be modular and extensible. You can easily add new features and functionality by using third-party libraries or writing your own modules.
 * **Complete documentation and testing**: Nunu has complete documentation and testing. It provides comprehensive documentation and examples to help you get started quickly. It also includes a set of test suites to ensure that your application works as expected.
 
-## Preview
-![Nunu](https://github.com/go-nunu/nunu/blob/main/.github/assets/iterm.png)
+## Nunu CLI
+
+![Nunu](https://github.com/go-nunu/nunu/blob/main/.github/assets/screenshot.jpg)
+
+
+## Documentation
+* [Guide](https://github.com/go-nunu/nunu/blob/main/docs/en/guide.md)
+* [Architecture](https://github.com/go-nunu/nunu/blob/main/docs/en/architecture.md)
+* [Tutorial](https://github.com/go-nunu/nunu/blob/main/docs/en/tutorial.md)
+
 
 ## Directory Structure
 ```
@@ -106,10 +121,11 @@ This is the directory structure of a classic Golang project, which includes the
 To use Nunu, you need to install the following software on your system:
 
 * Golang 1.16 or higher
+* Git
 * MySQL 5.7 or higher (optional)
 * Redis (optional)
 
-## Installation
+### Installation
 
 You can install Nunu using the following command:
 
@@ -117,7 +133,6 @@ You can install Nunu using the following command:
 go install github.com/go-nunu/nunu@latest
 ```
 
-## Usage
 
 ### Creating a New Project
 
@@ -125,6 +140,10 @@ You can create a new Golang project using the following command:
 
 ```bash
 nunu new projectName
+
+// or
+
+nunu new projectName -r https://github.com/go-nunu/nunu-layout-advanced.git
 ```
 
 This command will create a directory named `projectName` and generate an elegant Golang project structure within it.
@@ -137,13 +156,14 @@ You can create handlers, services, and daos for your project using the following
 nunu create handler user
 nunu create service user
 nunu create dao user
+nunu create model user
 ```
 or
 ```
-nunu create hsd user
+nunu create all user
 ```
 
-These commands will create components named `UserHandler`, `UserService`, and `UserDao`, respectively, and place them in the correct directories.
+These commands will create components named `UserHandler`, `UserService`, `UserDao` and `UserModel`, respectively, and place them in the correct directories.
 
 ### Starting the Project
 

+ 37 - 20
README_zh.md

@@ -1,7 +1,9 @@
-# Nunu
-[英文介绍](https://github.com/go-nunu/nunu/blob/main/README.md)
+# Nunu — A CLI tool for building go aplication.
+
 
-Nunu是一个基于Golang的应用脚手架,它的名字来自于英雄联盟中的游戏角色,一个骑在雪怪肩膀上的小男孩,和努努一样,该项目也是站在巨人的肩膀上,它是由各种第三方库组合而成的,包括gin、gorm、wire、viper、zap、golang-jwt、go-redis、testify、sonyflake、go-survey、cobra等。这些库都是Golang生态中非常流行的库,它们的组合可以帮助你快速构建一个高效、可靠的应用程序。
+Nunu是一个基于Golang的应用脚手架,它的名字来自于英雄联盟中的游戏角色,一个骑在雪怪肩膀上的小男孩。和努努一样,该项目也是站在巨人的肩膀上,它是由Golang生态中各种非常流行的库整合而成的,它们的组合可以帮助你快速构建一个高效、可靠的应用程序。
+
+[英文介绍](https://github.com/go-nunu/nunu/blob/main/README.md)
 
 ![Nunu](https://github.com/go-nunu/nunu/blob/main/.github/assets/banner.png)
 
@@ -25,9 +27,15 @@ Nunu是一个基于Golang的应用脚手架,它的名字来自于英雄联盟
 * **模块化和可扩展**:Nunu旨在具有模块化和可扩展性。您可以通过使用第三方库或编写自己的模块轻松添加新功能和功能。
 * **文档完善和测试完备**:Nunu文档完善,测试完备。它提供了全面的文档和示例,帮助您快速入门。它还包括一套测试套件,确保您的应用程序按预期工作。
 
-## 预览
-![Nunu](https://github.com/go-nunu/nunu/blob/main/.github/assets/iterm.png)
+## Nunu CLI
+
+![Nunu](https://github.com/go-nunu/nunu/blob/main/.github/assets/screenshot.jpg)
 
+
+## 文档
+* [使用指南](https://github.com/go-nunu/nunu/blob/main/docs/en/guide.md)
+* [分层架构](https://github.com/go-nunu/nunu/blob/main/docs/en/architecture.md)
+* [上手教程](https://github.com/go-nunu/nunu/blob/main/docs/en/tutorial.md)
 ## 目录结构
 ```
 .
@@ -86,28 +94,30 @@ Nunu是一个基于Golang的应用脚手架,它的名字来自于英雄联盟
 - `cmd`:存放命令行应用的代码,例如 `main.go`。
 - `config`:存放配置文件,例如 `config.yaml`。
 - `internal`:存放项目内部的代码,不对外暴露。
-  - `dao`:存放数据访问对象(Data Access Object)的代码。
-  - `handler`:存放 HTTP 请求处理器的代码。
-  - `middleware`:存放 HTTP 中间件的代码。
-  - `model`:存放数据模型的代码。
-  - `provider`:存放依赖注入的代码。
-  - `server`:存放 HTTP 服务器的代码。
-  - `service`:存放业务逻辑的代码。
+    - `dao`:存放数据访问对象(Data Access Object)的代码。
+    - `handler`:存放 HTTP 请求处理器的代码。
+    - `middleware`:存放 HTTP 中间件的代码。
+    - `model`:存放数据模型的代码。
+    - `provider`:存放依赖注入的代码。
+    - `server`:存放 HTTP 服务器的代码。
+    - `service`:存放业务逻辑的代码。
 - `pkg`:存放可重用的代码,对外暴露。
-  - `config`:存放读取配置文件的代码。
-  - `helper`:存放辅助函数的代码。
-  - `http`:存放 HTTP 相关的代码。
-  - `log`:存放日志相关的代码。
+    - `config`:存放读取配置文件的代码。
+    - `helper`:存放辅助函数的代码。
+    - `http`:存放 HTTP 相关的代码。
+    - `log`:存放日志相关的代码。
 
 ## 要求
 要使用Nunu,您需要在系统上安装以下软件:
 
 * Golang 1.16或更高版本
+* Git
 * MySQL5.7或更高版本(可选)
 * Redis(可选)
 
 
-## 安装
+
+### 安装
 
 您可以通过以下命令安装Nunu:
 
@@ -115,7 +125,6 @@ Nunu是一个基于Golang的应用脚手架,它的名字来自于英雄联盟
 go install github.com/go-nunu/nunu@latest
 ```
 
-## 使用
 
 ### 创建新项目
 
@@ -124,6 +133,13 @@ go install github.com/go-nunu/nunu@latest
 ```bash
 nunu new projectName
 ```
+默认拉取github源,你也可以使用国内加速仓库
+```
+// 使用基础模板
+nunu new projectName -r https://gitee.com/go-nunu/nunu-layout-basic.git
+// 使用高级模板
+nunu new projectName -r https://gitee.com/go-nunu/nunu-layout-advanced.git
+```
 
 此命令将创建一个名为`projectName`的目录,并在其中生成一个优雅的Golang项目结构。
 
@@ -135,12 +151,13 @@ nunu new projectName
 nunu create handler user
 nunu create service user
 nunu create dao user
+nunu create model user
 ```
 ```
-nunu create hsd user
+nunu create all user
 ```
-这些命令将分别创建一个名为`UserHandler`、`UserService`和`UserDao`的组件,并将它们放置在正确的目录中。
+这些命令将分别创建一个名为`UserHandler`、`UserService`、`UserDao`和`UserModel`的组件,并将它们放置在正确的目录中。
 
 ### 启动项目