MCPcopy Create free account
hub / github.com/OpenListTeam/OpenList / SuccessWithMsgResp

Function SuccessWithMsgResp

server/common/common.go:111–122  ·  view source on GitHub ↗
(c *gin.Context, msg string, data ...interface{})

Source from the content-addressed store, hash-verified

109}
110
111func SuccessWithMsgResp(c *gin.Context, msg string, data ...interface{}) {
112 var respData interface{}
113 if len(data) > 0 {
114 respData = data[0]
115 }
116
117 c.JSON(200, Resp[interface{}]{
118 Code: 200,
119 Message: msg,
120 Data: respData,
121 })
122}
123
124func Pluralize(count int, singular, plural string) string {
125 if count == 1 {

Callers 2

FsRecursiveMoveFunction · 0.92
SuccessRespFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected