MCPcopy Index your code
hub / github.com/go-dev-frame/sponge / getUserExampleIDFromPath

Function getUserExampleIDFromPath

internal/handler/userExample.go:239–248  ·  view source on GitHub ↗
(c *gin.Context)

Source from the content-addressed store, hash-verified

237}
238
239func getUserExampleIDFromPath(c *gin.Context) (string, uint64, bool) {
240 idStr := c.Param("id")
241 id, err := utils.StrToUint64E(idStr)
242 if err != nil || id == 0 {
243 logger.Warn("StrToUint64E error: ", logger.String("idStr", idStr), middleware.GCtxRequestIDField(c))
244 return "", 0, true
245 }
246
247 return idStr, id, false
248}
249
250func convertUserExample(userExample *model.UserExample) (*types.UserExampleObjDetail, error) {
251 data := &types.UserExampleObjDetail{}

Callers 3

DeleteByIDMethod · 0.85
UpdateByIDMethod · 0.85
GetByIDMethod · 0.85

Calls 4

StrToUint64EFunction · 0.92
WarnFunction · 0.92
StringFunction · 0.92
GCtxRequestIDFieldFunction · 0.92

Tested by

no test coverage detected