-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
2 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,4 @@ | ||
## Change log | ||
|
||
1. Adjust errcode package, support custom error message. | ||
|
||
example: | ||
|
||
```go | ||
//http code | ||
// code(10003) and message | ||
ecode.InvalidParams.Err("custom error message") | ||
// code(400) and message | ||
ecode.InvalidParams.ErrToHTTP("custom error message") | ||
|
||
// grpc code | ||
// code(30003) and message | ||
ecode.StatusInvalidParams.Err("custom error message") | ||
// code(3) and message | ||
ecode.StatusInvalidParams.ToRPCErr("custom error message") | ||
// code(30003) and message, use in grpc-gateway | ||
ecode.StatusInvalidParams.ErrToHTTP("custom error message") | ||
``` | ||
|
||
2. Optimize print log, grpc support custom marshal data. | ||
|
||
3. Adjust some code. | ||
1. Fix logging bug [#59](https://github.com/zhufuyi/sponge/issues/59). | ||
2. Add custom jwt authentication in grpc service. |