Skip to content

Commit 50ef284

Browse files
committed
更新说明文件
1 parent 257a770 commit 50ef284

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

.DS_Store

6 KB
Binary file not shown.

README.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,24 @@
55
go get -u github.com/hulutech-web/http_result
66

77
```
8-
##### 1.1发布资源
9-
```go
10-
go run . artisan vendor:publish --package=github.com/hulutech-web/http_result
11-
12-
```
13-
##### 1.2 注册服务提供者:config/app.go
8+
##### 1.1 注册服务提供者:config/app.go
149
```go
1510
import "github.com/hulutech-web/http_result"
1611

1712
func init() {
1813
"providers": []foundation.ServiceProvider{
1914
....
2015
&http_result.ServiceProvider{},
21-
2216
}
23-
2417
}
2518

2619
```
20+
##### 1.2发布资源
21+
```go
22+
go run . artisan vendor:publish --package=github.com/hulutech-web/http_result
23+
24+
```
25+
2726
#### 二、使用
2827

2928
##### 2.1 使用说明:自定义默认返回
@@ -38,12 +37,13 @@ config.Add("http_result", map[string]any{
3837
##### 方式一:
3938
一、成功返回:
4039
```
41-
import httpfacades "[email protected]:hulutech-web/http_result.git"
40+
import httpfacades "github.com/hulutech-web/http_result"
41+
4242
return httpfacades.NewResult(ctx).Success("", user)
4343
```
4444
二、失败返回:
4545
```go
46-
import httpfacades "git@github.com:hulutech-web/http_result.git"
46+
import httpfacades "github.com/hulutech-web/http_result"
4747
httpfacades.NewResult(ctx).Error(500, "用户不存在", "no users find")
4848
```
4949
三、表单验证错误:

0 commit comments

Comments
 (0)