Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
oldme-git committed Dec 17, 2024
1 parent 27f6a45 commit d25e644
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/course/starbook/starbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ description: '本书通过GoFrame框架,以星辰英语本项目实战为例
---
本书是一本操作向的书籍,唯一的建议就是跟着书籍一步一步的操作。纸上得来终觉浅,绝知此事要躬行!

在跟着本书操作过程中,最好结合[官方开发手册](https://goframe.org/docs/design),尝试举一反三,才能更好的理解和掌握。
在跟着本书操作过程中,最好结合[官方开发手册](../../docs/框架设计/框架设计.md),尝试举一反三,才能更好的理解和掌握。

## 联系作者
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ description: '星辰英语本项目的用户注册功能的开发,详细阐述

经过映射后,我们可以通过操作对象来处理数据表,而避免直接编写`SQL`语句。这不仅提高了代码的可读性和维护性,还从安全性上避免了常见的 `SQL` 注入问题。

`GoFrame`通过 [gdb](https://goframe.org/docs/core/gdb) 组件内置了`ORM`功能,提供了便捷常用的`SQL`操作。
`GoFrame`通过 [gdb](../../../docs/核心组件/数据库ORM/数据库ORM.md) 组件内置了`ORM`功能,提供了便捷常用的`SQL`操作。

举一个例子:
```go
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ done!

这里生成的四个文件,我们只需要关注`users_v1_register.go`即可,它用作接收`HTTP`请求,并调用`Logic`完成业务流程。

> 如果您已经安装了[GoFrame Helper](https://plugins.jetbrains.com/plugin/23324-goframe-helper)插件,会自动执行`gf gen ctrl`命令。也可以使用官网提供自动生成方式:[教程配置](https://goframe.org/docs/cli/gen-ctrl#%E8%87%AA%E5%8A%A8%E6%A8%A1%E5%BC%8F%E6%8E%A8%E8%8D%90)
> 如果您已经安装了[GoFrame Helper](https://plugins.jetbrains.com/plugin/23324-goframe-helper)插件,会自动执行`gf gen ctrl`命令。也可以使用官网提供自动生成方式:[教程配置](../../../docs/开发工具/代码生成-gen/接口规范-gen%20ctrl.md#自动模式推荐)
## 编写Logic
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ type RegisterRes struct {
}
```

多个验证规则使用`|`隔开,`required`表示此字段必填,`length`表示位数在`3-12`之间,`email`表示只接受合法的邮箱地址。所有可用的验证规则可在[开发手册](https://goframe.org/docs/core/gvalid-rules)中查阅。
多个验证规则使用`|`隔开,`required`表示此字段必填,`length`表示位数在`3-12`之间,`email`表示只接受合法的邮箱地址。所有可用的验证规则可在[开发手册](../../../docs/核心组件/数据校验/数据校验-校验规则.md)中查阅。

发起一个空用户名请求测试:
```bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ If you are already a programmer but not very familiar with `Go` and want to furt
---
This is a hands-on book, and the only suggestion is to follow it step by step. Learning from books alone can be superficial; practical experience is essential!

While following the book, it's best to refer to the [official development manual](https://goframe.org/docs/design) and try to extrapolate on it to better understand and master the content.
While following the book, it's best to refer to the [official development manual](../../docs/框架设计/框架设计.md) and try to extrapolate on it to better understand and master the content.

## Contact the Author
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The `GoFrame` framework has an excellent code layering design, with a clear and

After mapping, we can handle data tables by manipulating objects, avoiding the need to write `SQL` statements directly. This not only improves code readability and maintainability but also prevents common `SQL` injection issues from a security standpoint.

`GoFrame` provides built-in `ORM` functionality through the [gdb](https://goframe.org/docs/core/gdb) component, offering convenient and common `SQL` operations.
`GoFrame` provides built-in `ORM` functionality through the [gdb](../../../docs/核心组件/数据库ORM/数据库ORM.md) component, offering convenient and common `SQL` operations.

Here's an example:
```go
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ done!

Among the four generated files, we only need to focus on `users_v1_register.go`, which is used to receive HTTP requests and call `Logic` to complete the business process.

> If you have installed the [GoFrame Helper](https://plugins.jetbrains.com/plugin/23324-goframe-helper) plugin, the `gf gen ctrl` command will be executed automatically. You can also use the official automatic generation method: [Tutorial Configuration](https://goframe.org/docs/cli/gen-ctrl#%E8%87%AA%E5%8A%A8%E6%A8%A1%E5%BC%8F%E6%8E%A8%E8%8D%90).
> If you have installed the [GoFrame Helper](https://plugins.jetbrains.com/plugin/23324-goframe-helper) plugin, the `gf gen ctrl` command will be executed automatically. You can also use the official automatic generation method: [Tutorial Configuration](../../../docs/开发工具/代码生成-gen/接口规范-gen%20ctrl.md#automatic-mode-recommended).
## Write Logic
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ type RegisterRes struct {
}
```

Multiple validation rules are separated by `|`, `required` indicates the field is mandatory, `length` indicates the length is between `3-12`, and `email` indicates only valid email addresses are accepted. Available validation rules can be found in the [Developer's Manual](https://goframe.org/docs/core/gvalid-rules).
Multiple validation rules are separated by `|`, `required` indicates the field is mandatory, `length` indicates the length is between `3-12`, and `email` indicates only valid email addresses are accepted. Available validation rules can be found in the [Developer's Manual](../../../docs/核心组件/数据校验/数据校验-校验规则.md).

Testing with an empty username request:
```bash
Expand Down

0 comments on commit d25e644

Please sign in to comment.