feat: compose response data

This commit is contained in:
email
2022-02-04 17:06:04 +08:00
parent d6418f5ff9
commit d609f2741d
8 changed files with 28 additions and 17 deletions

11
server/common.go Normal file
View File

@ -0,0 +1,11 @@
package server
func composeResponse(data interface{}) interface{} {
type R struct {
Data interface{} `json:"data"`
}
return R{
Data: data,
}
}