MCPcopy Index your code
hub / github.com/CodisLabs/codis / ApiResponseJson

Function ApiResponseJson

pkg/utils/rpc/api.go:192–199  ·  view source on GitHub ↗
(v interface{})

Source from the content-addressed store, hash-verified

190}
191
192func ApiResponseJson(v interface{}) (int, string) {
193 b, err := apiMarshalJson(v)
194 if err != nil {
195 return ApiResponseError(errors.Trace(err))
196 } else {
197 return 200, string(b)
198 }
199}
200
201func EncodeURL(host string, format string, args ...interface{}) string {
202 var u url.URL

Callers

nothing calls this directly

Calls 2

apiMarshalJsonFunction · 0.85
ApiResponseErrorFunction · 0.85

Tested by

no test coverage detected