MCPcopy Index your code
hub / github.com/apache/devlake / parseInt

Function parseInt

backend/plugins/q_dev/tasks/s3_data_extractor.go:424–436  ·  view source on GitHub ↗

解析整数

(fieldMap map[string]string, field string)

Source from the content-addressed store, hash-verified

422
423// 解析整数
424func parseInt(fieldMap map[string]string, field string) int {
425 value, ok := fieldMap[field]
426 if !ok {
427 return 0
428 }
429
430 intValue, err := strconv.Atoi(value)
431 if err != nil {
432 return 0
433 }
434
435 return intValue
436}
437
438var ExtractQDevS3DataMeta = plugin.SubTaskMeta{
439 Name: "extractQDevS3Data",

Callers 3

TestParseIntFunction · 0.85
createUserReportDataFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestParseIntFunction · 0.68