MCPcopy Index your code
hub / github.com/53AI/53AIHub / parseCommaSeparatedInt64IDs

Function parseCommaSeparatedInt64IDs

api/controller/skill_library_admin.go:114–134  ·  view source on GitHub ↗
(input string)

Source from the content-addressed store, hash-verified

112}
113
114func parseCommaSeparatedInt64IDs(input string) []int64 {
115 parts := strings.Split(input, ",")
116 ids := make([]int64, 0, len(parts))
117 seen := make(map[int64]struct{}, len(parts))
118 for _, part := range parts {
119 part = strings.TrimSpace(part)
120 if part == "" {
121 continue
122 }
123 id, err := strconv.ParseInt(part, 10, 64)
124 if err != nil || id <= 0 {
125 continue
126 }
127 if _, ok := seen[id]; ok {
128 continue
129 }
130 seen[id] = struct{}{}
131 ids = append(ids, id)
132 }
133 return ids
134}
135
136func buildSkillGitHubURL(skillInfo *model.SkillLibrary) string {
137 if skillInfo == nil || skillInfo.SourceType != model.SkillSourceTypeGithub {

Callers 2

AdminListSkillLibrariesFunction · 0.85
GetSkillExploreListFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected