MCPcopy Create free account
hub / github.com/celer-pkg/celer / merge

Method merge

buildtools/build_tools.go:298–312  ·  view source on GitHub ↗
(buildTools BuildTools)

Source from the content-addressed store, hash-verified

296}
297
298func (b BuildTools) merge(buildTools BuildTools) BuildTools {
299 for _, tool := range buildTools.BuildTools {
300 index := slices.IndexFunc(b.BuildTools, func(t BuildTool) bool {
301 return t.Name == tool.Name && t.Version == tool.Version
302 })
303 if index == -1 {
304 b.BuildTools = append(b.BuildTools, tool)
305 continue
306 }
307
308 b.BuildTools[index] = tool
309 }
310
311 return b
312}
313
314func (b BuildTools) parseNameVersion(nameVersion string) (string, string) {
315 if name, version, ok := strings.Cut(nameVersion, "@"); ok {

Callers 1

CheckToolsFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected