Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
新注册的用户请输入邮箱并保存,随后登录邮箱激活账号。后续可直接使用邮箱登录!
Open sidebar
白 鹿
contract-sdk-go
Commits
93f6adab
Commit
93f6adab
authored
Jan 12, 2023
by
taifu yuan
🏸
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add SuccessResponse
--story=1012856
parent
9eff2ad2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
8 deletions
+2
-8
sdk/response.go
sdk/response.go
+2
-8
No files found.
sdk/response.go
View file @
93f6adab
...
...
@@ -20,6 +20,8 @@ const (
ERROR
=
1
)
var
SuccessResponse
=
protogo
.
Response
{
Status
:
OK
,
Payload
:
[]
byte
(
"ok"
)}
// Success ...
func
Success
(
payload
[]
byte
)
protogo
.
Response
{
return
protogo
.
Response
{
...
...
@@ -28,14 +30,6 @@ func Success(payload []byte) protogo.Response {
}
}
// Success normal
func
SuccessNormal
()
protogo
.
Response
{
return
protogo
.
Response
{
Status
:
OK
,
Payload
:
[]
byte
(
"success"
),
}
}
// Error ...
func
Error
(
msg
string
)
protogo
.
Response
{
return
protogo
.
Response
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment